-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
feat: Add support for custom Q&A in the knowledge base #10873 #10874
feat: Add support for custom Q&A in the knowledge base #10873 #10874
Conversation
response = LLMGenerator.generate_qa_document( | ||
current_user.current_tenant_id, preview_texts[0], doc_language | ||
) | ||
if "Q00001:" in preview_texts[0] and "A00001:" in preview_texts[0]: |
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 one doesn't seem very generic.
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.
Is this the separator? "Q00001:" and "A00001:"? I can change to a common separator.
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.
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.
It is only a runtime delimiter variable and does not actually store
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 should not be done by implicitly change QA LLM mode to a normal QA extraction by a template. and if user choose to generate QA pair by template, ui shows a hint what template should be according to the file extension |
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.
I discussed with @JohnJyong, we decide not to merge this PR. If you have any other questions, please feel free to contact with @JohnJyong |
Summary
I need to import some Q&A text,not need LLM to generate results for me。
I modified the code to support excel and csv uploading qa files。
The processing logic is that when there are only two columns in csv or excel and qa mode is selected, the LLM will not be called。
Resolves #4664
Resolves #6904
Resolves #7735
Resolves #7430
Resolves #10873
Screenshots
Checklist
Important
Please review the checklist below before submitting your pull request.
dev/reformat
(backend) andcd web && npx lint-staged
(frontend) to appease the lint gods