Skip to content

Cross-source synthesis ("compare what these sources say about X") #65

Description

@nazim117

Problem

RAG retrieval today (rag.py) returns per-chunk matches for a query — good for "what does this say about X" but not for "compare/contrast what these three papers say about X," which is a common study need when reading multiple sources on the same topic.

Proposal

Add a synthesis mode: given a topic/question, retrieve top chunks per distinct source (not just top-k globally), and prompt the LLM explicitly to compare/contrast across sources, citing each distinctly. Could be a new endpoint or a chat modifier (similar in spirit to the recently-added web_search toggle on POST /chat — user-triggered, not model-guessed).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions