Skip to main content

agrag.ingestion.merge.resolve_description

resolve_description(candidates:list[object], *, settings:Any | None = None, client:Any | None = None, tracer:Tracer | None = None) -> tuple[object, bool, Any | None]

Resolve a description field, trying LLM summarization.

A single distinct candidate needs no LLM call. Multiple candidates try LLM summarization. On failure, fall back to concatenation.

Parameters:

  • candidates (list[object]) – Candidate values in encounter order.
  • settings (Any | None) – LLM settings for summarization. None uses defaults.
  • client (Any | None) – An already-built BAML client for tests.
  • tracer (Tracer | None) – Opens the agrag.merge.resolve_description span and the LLM call spans below it.

Returns:

  • tuple[object, bool, Any | None] – The resolved value, whether it conflicted, and an optional failure.