-
Notifications
You must be signed in to change notification settings - Fork 0
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: added text summarization to pgRag #12
Conversation
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.
code wise looks good. But lets clean it up a bit. Can you move all numbers and and all text to a constants file.
I would recommend loading the prompts from a txt file as these will change with more requirements
@@ -0,0 +1,72 @@ | |||
import { PromptTemplate } from '@langchain/core/prompts' |
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.
code wise looks good. But lets clean it up a bit. Can you move all numbers and and all text to a constants file.
I would recommend loading the prompts from a txt file as these will change with more requirements
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.
Looks good overall:
- I would not necessarily expose the summarize function. If we think Nearform should provide one it may be good to put it in its own library.
- The summarization should be automated and be run on each added document as part of the
processDocument
job. The summary should then be added to the vectorized chunks for that document (metadata: { parentDocumentId: <sourc edoc id> }
|
Fixes #7