A Parser component formats a document chunk into text that downstream RAG steps can consume. It can pass only the chunk text or combine the text with useful metadata. section 4.2 section 4.3
Use the component as a small formatting stage in a retrieval workflow:
- Receive chunks retrieved from a document or vector database. section 4.2
- Set a template that determines what the language model receives. section 4.3
- Include metadata when fields such as file path or year help interpret the content. section 4.3
Passing a source with each chunk
A basic template uses {text}. To preserve provenance, use a template such as Source={file_path};Text={text}, which places the file path alongside the chunk before it reaches the LLM. section 4.3
The Parser does not retrieve or filter chunks itself. Advanced retrieval methods such as self-query can use metadata at search time, while the Parser controls the formatted text passed onward. section 4.3
