Griptape RAG Response: Footnote Prompt Module
RAG answers with receipts — footnotes on every claim
- prompt_driver
- rulesets
- MODULE
The Footnote Prompt Module is the Response Prompt Module with a superpower: every claim in the answer gets a footnote pointing at the source chunk it came from. Where plain RAG asks you to trust that the answer is grounded, this one shows its work - and for anything where a hallucination is expensive (research notes, reference material, "which settings does this manual actually recommend"), that's the difference between useful and merely plausible.
It's a response-stage module, so it plugs into response_stage_modules on the Griptape RAG Engine. The source chunks arrive from retrieval, and the module emits an answer with footnote-style citations back to them.
The inputs that matter
prompt_driver- the LLM writing the answer, from any of the pack's prompt drivers. Same rule as its sibling: leave it empty and it silently falls back to an OpenAI GPT-4o driver, expecting anOPENAI_API_KEYin your environment. Set it explicitly - even a local Ollama driver works, and keeps the whole pipeline private.rulesets- optional rules shaping the response. The author's tooltip calls these out for controlling the RAG response: "answer only from context," "format citations as [n]," that kind of thing. Since the whole point is verifiable claims, a rule demanding every factual statement be sourced is the natural fit here.
How it works
Under the hood it builds a Griptape FootnotePromptResponseRagModule - structurally the sibling of PromptResponseRagModule, with citation generation added. The driver writes the answer from the retrieved chunks and appends footnote markers that map statements back to the source text. What you get out is an answer you can check, which is the whole appeal.
What it outputs
A MODULE_LIST (list type, response-stage convention). Wire it into response_stage_modules on the RAG Engine. Note you'd typically pick one of Prompt Response or Footnote Prompt for a pipeline, not both - they're alternative ways to finish the answer.
Installing it
Ships in the pack - ComfyUI Manager → Griptape → ComfyUI-Griptape, restart, or
cd ComfyUI/custom_nodes
git clone https://github.com/griptape-ai/ComfyUI-Griptape
Common issues
The fallback-driver surprise applies here too - no prompt_driver means OpenAI behind the scenes. And there's a quality floor you can't rerank your way past: footnotes are only as good as the retrieval that fed them. If the sources themselves were junk, you get confidently-cited junk. Also remember this module needs a working retrieval stage on the engine; wiring only this module into a RAG engine produces an answer with nothing to footnote. Pack-wide torch/version issues apply as usual.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt_driveropt | PROMPT_DRIVER | Prompt driver to use for the module. | |
| rulesetsopt | RULESET | One or more rules to use with RAG. Use these to control the RAG response. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODULE | MODULE_LIST | — |