-
Notifications
You must be signed in to change notification settings - Fork 7
Feature/improved-language-detection #525
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
base: main
Are you sure you want to change the base?
Conversation
|
||
IMPORTANT NOTES ON THE "answer" FIELD: | ||
- Keep in mind that the user is asking a {message_type} question. | ||
- Answer in the language {original_language} in the script {original_script}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only line that actually changed. Evernthing else is exactly the same!
"query": "The vector database query that you have constructed based on | ||
the user's LATEST MESSAGE and the conversation history." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now just rely on paraphrase guardrail for search.
ADDITIONAL RELEVANT INFORMATION BELOW | ||
===================================== |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would render as a Heading when I display in Markdown, and just thought the HTML syntax is clearer!
if user_query_refined.chat_query_params: | ||
user_query_refined.query_text = user_query_refined.chat_query_params.pop( | ||
"search_query" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line meant that we're passing the modified search query through the entire guarail+RAG pipeline, instead of the original text.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then should the modified search be after the original query went through the guardrails?
3988358
to
50dc513
Compare
@@ -460,10 +492,9 @@ async def wrapper( | |||
The appropriate response object. | |||
""" | |||
|
|||
if not query_refined.chat_query_params: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you remove the check? I am guessing paraphrasing key words instead of a full sentence is not useful
9959e13
to
40187b8
Compare
Reviewer: @lickem22
Estimate: 1 hr
Ticket
Fixes:
Description
Detect both language AND script, and use them in generating the response.
Goal
Changes
Future Tasks (optional)
How has this been tested?
For guardrails, at project root
For the question-answering endpoints, test various scenarios in the dev environment.
To-do before merge (optional)
Checklist
Fill with
x
for completed.(Delete any items below that are not relevant)