Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: add hallucination detection to server #2915

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

densumesh
Copy link
Contributor

Please indicate what issue this PR is related to and @ any maintainers who are relevant

@densumesh densumesh force-pushed the ds/add-hallucination-detection-to-server branch 3 times, most recently from d609968 to a70c838 Compare December 10, 2024 00:07
hallucination-detection/src/lib.rs Show resolved Hide resolved
hallucination-detection/src/lib.rs Show resolved Hide resolved
hallucination-detection/src/lib.rs Show resolved Hide resolved
hallucination-detection/src/lib.rs Show resolved Hide resolved
hallucination-detection/src/lib.rs Show resolved Hide resolved
hallucination-detection/src/lib.rs Show resolved Hide resolved
@skeptrunedev skeptrunedev self-requested a review December 10, 2024 05:26
@skeptrunedev skeptrunedev force-pushed the ds/add-hallucination-detection-to-server branch from a70c838 to c3d2a2a Compare December 11, 2024 00:51
cdxker
cdxker previously requested changes Dec 11, 2024
Copy link
Member

@cdxker cdxker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Dockerfile doesn't seem to work, I think we need to include ort into the cargo.toml or download libonnxruntime.so some other way

Copy link
Contributor

@skeptrunedev skeptrunedev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • fix image build
  • show null instead of 0 where hallucination detection has not run

image

@densumesh densumesh force-pushed the ds/add-hallucination-detection-to-server branch from c3d2a2a to d95f8f7 Compare December 11, 2024 02:35
Copy link
Contributor

@skeptrunedev skeptrunedev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ran fine on the big office computer, but was really slow on my laptop. I'm somewhat concerned about putting this into prod because I think it will necessitate putting the server on a GPU node.

I feel relatively strongly that we need to run the models separately outside of the server.

@densumesh densumesh force-pushed the ds/add-hallucination-detection-to-server branch from d95f8f7 to 01c59b9 Compare December 12, 2024 17:38
@skeptrunedev skeptrunedev self-requested a review December 12, 2024 18:54
@skeptrunedev skeptrunedev force-pushed the ds/add-hallucination-detection-to-server branch from 01c59b9 to 58b5d33 Compare December 12, 2024 19:16
@skeptrunedev
Copy link
Contributor

skeptrunedev commented Dec 12, 2024

image

image

I think the change which got made to old messages w/out hallucination detection didn't appear on the table is also messing up actual hallucinations. Either that or the NER change zeroed out everything?

Are we just not displaying 0's or do we have a smarter system for not displaying nulls?

Copy link
Contributor

@skeptrunedev skeptrunedev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

display detected hallucinations as non-zero on the table

@densumesh densumesh force-pushed the ds/add-hallucination-detection-to-server branch from 58b5d33 to 20d5f10 Compare December 13, 2024 19:11
Copy link
Contributor

@skeptrunedev skeptrunedev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

I also wonder if we should add something like "low confidence queries" and "likely hallucinations" in this PR.

Feels necessary to be able to sort in descending order by both top score and hallucination score.

@densumesh densumesh force-pushed the ds/add-hallucination-detection-to-server branch from 20d5f10 to 606cdc3 Compare December 13, 2024 19:22
Copy link
Contributor

@skeptrunedev skeptrunedev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be high prio on the ordered queries, but this is good!

@skeptrunedev skeptrunedev merged commit 598b134 into main Dec 13, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants