-
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
Add links to citations #139
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe changes introduce a new Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant ChatBot
participant LectureDB
participant CitationPipeline
User->>ChatBot: Ask a question
ChatBot->>LectureDB: Retrieve relevant lecture data
LectureDB->>ChatBot: Return lecture data with `lecture_unit_link`
ChatBot->>User: Provide an answer with citation links
Note over ChatBot, CitationPipeline: Citation formatting includes `lecture_unit_link`
User->>ChatBot: Ask for citations
ChatBot->>CitationPipeline: Format citations with links
CitationPipeline->>ChatBot: Return formatted citations
ChatBot->>User: Provide formatted citations
Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (1)
Additional context usedLanguageTool
Additional comments not posted (4)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (2)
app/pipeline/prompts/citation_prompt.txt (2)
3-3
: Correct the preposition for clarity.The preposition "at" should be replaced with "on" for better readability.
- At the end of the answer, list each source with its corresponding number and provide the Lecture Title, page number, and a clickable link in this format: [1] <a href="URL">"Lecture title", "page number"</a>. + On the end of the answer, list each source with its corresponding number and provide the Lecture Title, page number, and a clickable link in this format: [1] <a href="URL">"Lecture title", "page number"</a>.
27-27
: Reduce the number of exclamation marks.Using multiple exclamation marks may seem excessive. Consider using a single exclamation mark.
- please do not include any citations and return '!NONE!'. + please do not include any citations and return '!NONE'.Tools
LanguageTool
[style] ~27-~27: Using many exclamation marks might seem excessive (in this case: 4 exclamation marks for a text that’s 1855 characters long)
Context: ...o not include any citations and return '!NONE!'.(EN_EXCESSIVE_EXCLAMATION)
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.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (2)
app/pipeline/prompts/citation_prompt.txt (2)
4-4
: Replace "at" with "on" for better clarity.The instruction is clear, but replacing "at" with "on" improves readability.
Apply this diff to improve the readability:
-If the answer uses multiple pages from the same lecture, list the page numbers at the same line separated by commas in this format : [1] <a href="URL">"Lecture title", "Lecture unit", "page number1,number2,number3"</a>. +If the answer uses multiple pages from the same lecture, list the page numbers on the same line separated by commas in this format : [1] <a href="URL">"Lecture title", "Lecture unit", "page number1,number2,number3"</a>.Tools
LanguageTool
[uncategorized] ~4-~4: The preposition ‘on’ seems more likely in this position.
Context: ...the same lecture, list the page numbers at the same line separated by commas in th...(AI_HYDRA_LEO_REPLACE_AT_ON)
27-27
: Reduce the number of exclamation marks.The instruction is clear, but reducing the number of exclamation marks improves readability.
Apply this diff to improve the readability:
-If the answer actually does not contain any information from the paragraphs, please do not include any citations and return '!NONE!'. +If the answer actually does not contain any information from the paragraphs, please do not include any citations and return '!NONE!'.Tools
LanguageTool
[style] ~27-~27: Using many exclamation marks might seem excessive (in this case: 4 exclamation marks for a text that’s 1899 characters long)
Context: ...o not include any citations and return '!NONE!'.(EN_EXCESSIVE_EXCLAMATION)
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.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (2)
app/pipeline/prompts/citation_prompt.txt (2)
4-4
: Replace "at" with "on".The preposition "at" should be replaced with "on" for better readability.
- If the answer uses multiple pages from the same lecture, list the page numbers at the same line separated by commas in this format : [1] <a href="URL">"Lecture title", "Lecture unit title", "page number1,number2,number3"</a>. + If the answer uses multiple pages from the same lecture, list the page numbers on the same line separated by commas in this format : [1] <a href="URL">"Lecture title", "Lecture unit title", "page number1,number2,number3"</a>.Tools
LanguageTool
[uncategorized] ~4-~4: The preposition ‘on’ seems more likely in this position.
Context: ...the same lecture, list the page numbers at the same line separated by commas in th...(AI_HYDRA_LEO_REPLACE_AT_ON)
27-27
: Reduce the number of exclamation marks.Using many exclamation marks might seem excessive. Consider reducing them for better readability.
- If the answer actually does not contain any information from the paragraphs, please do not include any citations and return '!NONE!'. + If the answer actually does not contain any information from the paragraphs, please do not include any citations and return 'NONE'.Tools
LanguageTool
[style] ~27-~27: Using many exclamation marks might seem excessive (in this case: 4 exclamation marks for a text that’s 1927 characters long)
Context: ...o not include any citations and return '!NONE!'.(EN_EXCESSIVE_EXCLAMATION)
This PR adds links of the lecture units to citations.
Summary by CodeRabbit
New Features
lecture_unit_link
field to enhance lecture unit information with clickable links.Enhancements
Database Improvements
LECTURE_UNIT_NAME
andLECTURE_UNIT_LINK
.