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

feat(rag): Refactor DEFAULT_DOCUMENT_PROMPT in quivr_rag.py #2442

Merged
merged 1 commit into from
Apr 17, 2024

Conversation

StanGirard
Copy link
Collaborator

@StanGirard StanGirard commented Apr 17, 2024

This pull request refactors the DEFAULT_DOCUMENT_PROMPT in quivr_rag.py to improve code readability and maintainability. The unnecessary file name information has been removed from the prompt template as it is now included in the vector embedding


Ellipsis 🚀 This PR description was created by Ellipsis for commit 8193945.

Summary:

This PR refactors the DEFAULT_DOCUMENT_PROMPT in quivr_rag.py by removing the file name information from the prompt template, enhancing code readability and maintainability.

Key points:

  • Refactored DEFAULT_DOCUMENT_PROMPT in quivr_rag.py.
  • Removed file name information from the prompt template.
  • File name information is now included in the vector embedding.

Generated with ❤️ by ellipsis.dev

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Apr 17, 2024
Copy link

vercel bot commented Apr 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
quivrapp 🔄 Building (Inspect) Visit Preview Apr 17, 2024 10:25pm

@dosubot dosubot bot added the area: backend Related to backend functionality or under the /backend directory label Apr 17, 2024
@StanGirard StanGirard changed the title Refactor DEFAULT_DOCUMENT_PROMPT in quivr_rag.py feat(rag): Refactor DEFAULT_DOCUMENT_PROMPT in quivr_rag.py Apr 17, 2024
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me!

  • Reviewed the entire pull request up to 8193945
  • Looked at 16 lines of code in 1 files
  • Took 41 seconds to review
More info
  • Skipped 0 files when reviewing.
  • Skipped posting 1 additional comments because they didn't meet confidence threshold of 50%.
1. backend/modules/brain/rags/quivr_rag.py:67:
  • Assessed confidence : 50%
  • Comment:
    This change removes the file name from the DEFAULT_DOCUMENT_PROMPT. Please ensure that this doesn't affect any functionality where the file name was being used.
  • Reasoning:
    The PR author has removed the file name from the DEFAULT_DOCUMENT_PROMPT. This change seems to be in line with the PR description, which mentions that the file name information is now included in the vector embedding. However, it's important to ensure that this change doesn't break any functionality where the file name was being used. I need to check the usage of DEFAULT_DOCUMENT_PROMPT in the codebase.

Workflow ID: wflow_LOW6TlzG6AoKm5Gr


Not what you expected? You can customize the content of the reviews using rules. Learn more here.

⌛ You have 1 day remaining in your free trial. Upgrade at https://app.ellipsis.dev for $20/developer/month. If you have any questions, reach us at help@ellipsis.dev

@StanGirard StanGirard merged commit 1e6ff8f into main Apr 17, 2024
2 of 6 checks passed
StanGirard added a commit that referenced this pull request Apr 19, 2024
🤖 I have created a release *beep* *boop*
---


## 0.0.231 (2024-04-19)

## What's Changed
* feat(assistants): Add user usage update and pricing calculation to ITO
assistant by @StanGirard in #2433
* feat(assistant): improve prompt summary by @StanGirard in
#2435
* feat(assistants): Add PDF generation functionality and nice emails by
@StanGirard in #2436
* feat(analytics): rely on sql rather that python loop for brains by
@StanGirard in #2437
* fix(assistant): summary now can output 2000 tokens by @StanGirard in
#2440
* feat(assistant): check if key of file is same as filename uploaded by
@StanGirard in #2439
* feat: Update Docker build commands and dependencies by @StanGirard in
#2441
* feat(rag): Refactor DEFAULT_DOCUMENT_PROMPT in quivr_rag.py by
@StanGirard in #2442
* Enable Porter Application quivr-back by @porter-deployment-app in
#2443
* Enable Porter Application quivr-demo-front by @porter-deployment-app
in #2444
* fix(assistants): brain id is null by @StanGirard in
#2445
* feat(summary): improve prompt to get more insights by @StanGirard in
#2446
* feat(aws): Update CPU and memory configurations for task definitions
by @StanGirard in #2447
* feat(frontend): Quivr Assistants by @Zewed in
#2448


**Full Changelog**:
v0.0.230...v0.0.231

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

<!--
ELLIPSIS_HIDDEN
-->


----

| 🚀 This description was created by
[Ellipsis](https://www.ellipsis.dev) for commit
a16fa4d |
|--------|

### Summary:
This PR releases version 0.0.231, introducing several feature
enhancements and bug fixes across the assistant, analytics, Docker, and
frontend modules.

**Key points**:
- Release version 0.0.231 with feature enhancements and bug fixes across
multiple modules
- User usage update and pricing calculation added to ITO assistant
- Improved prompt summary in assistant module
- PDF generation functionality and email enhancements added
- Analytics optimized by relying on SQL instead of Python loop
- Token output limit fixed in assistant summary
- Docker build commands and dependencies updated
- DEFAULT_DOCUMENT_PROMPT in quivr_rag.py refactored
- Porter Applications for quivr-back and quivr-demo-front enabled
- Null brain id issue fixed in assistants module
- Prompt improved for better insights in summary module
- CPU and memory configurations for AWS task definitions updated
- Quivr Assistants added in frontend


----
Generated with ❤️ by [ellipsis.dev](https://www.ellipsis.dev)



<!--
ELLIPSIS_HIDDEN
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: backend Related to backend functionality or under the /backend directory size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant