smart-advisor / src /utils /context_builder.py
sajaahmed5
Smart Advisor deployment
74e8a7b
Raw
History Blame Contribute Delete
211 Bytes
"""
Build the numbered context string passed to the LLM from retrieved chunks.
"""
def build_context(documents: list[str]) -> str:
return "\n\n".join(f"[{i + 1}] {doc}" for i, doc in enumerate(documents))