Answers to Documents
A RocketRide adapter node that turns model/agent answers into embeddable documents, so validated, self-describing facts can be indexed back into a vector store.
What it does
Reads the answers lane and emits documents on the documents lane, bridging a gap in the pipeline graph: many nodes produce answers, but none previously turned an answer back into documents, so an LLM's structured/validated output could not be re-embedded and indexed.
Granularity is "one document per validated fact":
- a JSON array answer yields one document per item (each fact is indexed independently),
- a JSON object or plain-text answer yields a single document,
- an empty/whitespace answer yields no documents.
Each output document's page_content is the fact text (list items that are already strings are used verbatim; other values are serialized as JSON). Documents are stamped with an incrementing chunkId (reset for each input object) and marked as non-table content (isTable: false, tableId: 0).
The original answer is always passed through unchanged on the answers lane, so a single pipeline can both index the answer and keep serving it (for example to a response node) in the same run.
The node has no Python package requirements of its own: it relies entirely on the separately installed AI module.
Configuration
Lanes
| Lane in | Lane out | Description |
|---|---|---|
answers | documents, answers | Emit one document per validated fact; pass the original answer through |
No configuration fields. Wire answers in.
Usage
Place this node after an LLM, agent, or extract/validate node (anything that produces answers) and before an embedding node and vector store:
llm / agent → answer_documents → embedding_* → vector store
↘ response (original answer, optional)
The documents output is embedded and indexed for later retrieval, enabling the highest-quality RAG design — indexing self-describing, validated facts rather than raw chunks. The answers passthrough lets the same answer continue to a downstream sink in the same pipeline.
Example: an upstream node returns a validated JSON array of facts
[
{"metric": "revenue", "period": "FY2024", "value": "5.2M", "currency": "USD"},
{"metric": "gross_margin", "period": "FY2024", "value": "61%"}
]
answer_documents emits two documents, one per fact, each ready to be embedded and indexed.
Schema
No configuration fields.