INNER CODE UNIT · Python

RagResponse

pathwaycom/llm-app · serviette/server/main.py:82

class RagResponse(BaseModel):
    answer: str
    sources: list[RetrieveResult]
    # How the answer was produced: "search" (chunk retrieval), "catalog"
    # (the document listing), "document" / "compare" (whole named documents)
    # or "unresolved" (the question named documents that could not be
    # identified). Anything but "search" comes from ``rag.documents``.
    mode: str = "search"
    # The documents the answer is scoped to (document / compare modes).
    documents: list[str] = Field(default_factory=list)
    # A system-computed remark on the answer's coverage, e.g. that only part
    # of a document was read or how many differences were found.
    notice: str | None = None


class _IndexChangeTracker:
    """Notice index changes the stored timestamps cannot show.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…