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

[DERCBOT-1037] Use of PromptTemplate And Rewrite the RAG chain using LCEL #1772

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

assouktim
Copy link
Contributor

@assouktim assouktim commented Oct 21, 2024

This pull request includes several changes to the RAG (Retrieval-Augmented Generation) system to improve prompt handling, dependency updates, and refactoring of callback handlers and utility functions. The most important changes are summarized below:

Improvements to Prompt Handling:

  • Refactored RAGQuery to use PromptTemplate instead of questionAnsweringPromptInputs for better prompt handling. (bot/engine/src/main/kotlin/engine/config/RAGAnswerHandler.kt, gen-ai/orchestrator-client/src/main/kotlin/ai/tock/genai/orchestratorclient/requests/RAGQuery.kt, gen-ai/orchestrator-server/src/main/python/server/src/gen_ai_orchestrator/routers/requests/requests.py) [1] [2] [3] [4] [5]

Dependency Updates:

  • Updated various dependencies in pyproject.toml to their latest versions to ensure compatibility and security. (gen-ai/orchestrator-server/src/main/python/server/pyproject.toml) [1] [2]

Refactoring and Cleanup:

  • Removed the validate_prompt_template function from completion_service.py and moved it to prompt_utility.py for better modularity. (gen-ai/orchestrator-server/src/main/python/server/src/gen_ai_orchestrator/services/completion/completion_service.py) [1] [2] [3]
  • Replaced RetrieverJsonCallbackHandler with RAGCallbackHandler to improve callback handling in the RAG chain execution. (gen-ai/orchestrator-server/src/main/python/server/src/gen_ai_orchestrator/services/langchain/callbacks/rag_callback_handler.py, gen-ai/orchestrator-server/src/main/python/server/src/gen_ai_orchestrator/services/langchain/rag_chain.py) [1] [2] [3] [4] [5] [6]

These changes enhance the robustness, maintainability, and performance of the RAG system.

@assouktim assouktim force-pushed the feature/dercbot-1037 branch 3 times, most recently from 3a890f3 to c93e056 Compare October 23, 2024 14:45
@assouktim assouktim force-pushed the feature/dercbot-1037 branch from a76469a to f184b16 Compare October 25, 2024 10:15
@assouktim assouktim changed the title [DERCBOT-1037] Use of PromptTemplate [DERCBOT-1037] Use of PromptTemplate And Rewrite the RAG chain using LCEL Oct 25, 2024
@assouktim assouktim self-assigned this Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

1 participant