AI Dynamics

Global AI News Aggregator

Control Document Metadata in LLM Prompts with format_document

`format_document` Want to control which metadata keys show up in the prompt? This helper function is rarely exposed, but is key to combining documents with LLMs It takes a Document and formats it into a string using a PromptTemplate Docs: https://
api.python.langchain.com/en/latest/sche
ma/langchain.schema.prompt_template.format_document.html#langchain.schema.prompt_template.format_document

→ View original post on X — @hwchase17,

Commentaires

Leave a Reply

Your email address will not be published. Required fields are marked *