Skip to content

chore: refactoring of retrievers and answering stages reporting - #58

Merged
xscratt merged 5 commits into
developmentfrom
feat/refactoring-of-stages
Aug 18, 2026
Merged

chore: refactoring of retrievers and answering stages reporting#58
xscratt merged 5 commits into
developmentfrom
feat/refactoring-of-stages

Conversation

@xscratt

@xscratt xscratt commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Description of changes

  • Introduce new AbstractAnswer that wraps DIAL's Choice and encapsulates logic that was previously provided by RetrievalStageListener and AnswerCallback abstractions, and refactored the code accordingly.
    Now RAG pipeline has more control on emitting additional stages during the whole process of answer generation but the stages itself (along with final answer's content) are still decoupled from chat completion API and can be used from other entrypoints (such as MCP or REST call).
  • Debug stages are created with dedicated marker. They are turned off by default and can be turned on via ENABLE_DEBUG_STAGES environment variable.
  • Refactored retrievers implementation to remove dependency on langchain's BaseRetriever classes and simplify their code in general.

These changes are required for #50.

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@xscratt xscratt self-assigned this Aug 13, 2026
…ng-of-stages

# Conflicts:
#	.env.template
#	src/generic_rag/app/mcp.py
#	src/generic_rag/components/retrieval/document_selector.py
@xscratt
xscratt merged commit eaf97ab into development Aug 18, 2026
8 checks passed
@xscratt
xscratt deleted the feat/refactoring-of-stages branch August 18, 2026 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant