Table of Contents

Interface IContextBuilder

Namespace
Mythosia.AI.Rag
Assembly
Mythosia.AI.Rag.Abstractions.dll

Assembles vector search results into a context string suitable for LLM prompts.

public interface IContextBuilder

Methods

BuildContext(string, IReadOnlyList<VectorSearchResult>)

Builds a context string from the user query and retrieved search results. The returned string is typically prepended to the LLM prompt as reference material.

string BuildContext(string query, IReadOnlyList<VectorSearchResult> searchResults)

Parameters

query string

The original user query.

searchResults IReadOnlyList<VectorSearchResult>

The top-K search results from the vector store.

Returns

string

A formatted context string for the LLM.