Skip to content

Surface dropped_citations in /ask API response and CLI - #18

Merged
royalpinto007 merged 1 commit into
AgentPostmortem:mainfrom
kaminimangal:add-dropped-citations-to-response
Aug 11, 2026
Merged

Surface dropped_citations in /ask API response and CLI#18
royalpinto007 merged 1 commit into
AgentPostmortem:mainfrom
kaminimangal:add-dropped-citations-to-response

Conversation

@kaminimangal

Copy link
Copy Markdown
Contributor

What & why

dropped_citations was already being calculated in generate.py whenever the model cited a source that wasn't actually given to it, but it never made it out anywhere — not in the API response, not in the CLI. So if the model hallucinated a citation, there was no way to actually see that it happened (unless every single citation was fake, which triggers a full refusal already).

Changes

  • Added dropped_citations to AskResponse in main.py and passed it through in the /ask endpoint
  • Added a yellow warning in the CLI's _ask when there are dropped citations, same style as the existing conflict/stale warnings
  • Added a test that scripts a fake citation and checks it shows up in the response

Ran the full suite locally, everything passes (58 tests).

Closes #4

Checklist

  • Focused change with a clear description
  • Ran format / lint / tests (see README)
  • Updated docs or CHANGELOG if relevant
  • Linked any related issue (e.g. Closes #123)

@github-actions

Copy link
Copy Markdown

Welcome, @kaminimangal, and thanks for your first pull request to VaultRAG.

A quick look at CONTRIBUTING.md covers how things are set up and run here.

I'll review this shortly. Ask anything in the thread if something is unclear.

@royalpinto007
royalpinto007 merged commit 34348ea into AgentPostmortem:main Aug 11, 2026
7 checks passed
@github-actions

Copy link
Copy Markdown

Merged, @kaminimangal. Thank you for taking the time.

Good, focused change. Exactly the kind of thing VaultRAG needs.

If VaultRAG is useful to you, a star goes a long way.

Happy to see more from you whenever you have the time.

@kaminimangal
kaminimangal deleted the add-dropped-citations-to-response branch August 11, 2026 08:29
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.

dropped_citations is computed but never surfaced in the API response or the CLI

2 participants