Runko Works

Case study

A hybrid search agent for half-structured questions

Business questions that are half structured data, half free text: an agent that answers both at once, without copying sensitive data out of its platform.

Client
Global energy technology company
Role
AI software architect, architecture and delivery lead
Period
2026
Area
AI
Stack
SQL · semantic search · LLM agents

Why it mattered

Most questions a business asks about its own records come in two halves. One half is structured: which project, which period, which category. The other half sits in free text, in the description someone typed when the record was created, because that is where the actual reason is written down.

A database query answers the first half. Semantic search answers the second. Neither answers the question, and this is where many enterprise AI pilots stall: the demo works on a clean example, and real questions fall between the two.

The records were also sensitive. Copying them into a separate AI store would have meant rebuilding access control around the copy and explaining to governance why the data had moved.

How it works

A business questionhalf structured, half free text

Structured half

Which project, which period, which category. Or how many, in which phase.

A database query answers only this half

Free-text half

What happened and why, as someone typed it into the record

Semantic search answers only this half

Exact queryon the structured fields
  • Filter: narrows the records
  • Aggregate: counts them, per phase or period
Semantic searchover the description: ranks what is left
One resultrecords and counts, merged before the model sees them
Modelanswers from the result
Answerrefers back to the records it rests on

Next to the dataThe agent runs on the platform the records live in. Nothing is copied out; access control applies unchanged.

Neither a query nor a search answers the question. The agent runs both and answers from what both return.
  • Built next to the data. The agent runs on the data platform the records already live in. Nothing is copied into a separate vector store, so existing governance and access control keep applying unchanged.
  • Hybrid retrieval. Deterministic filters on the structured fields narrow the records first; semantic search over the free-text description ranks what is left. The two result sets are merged before the model sees them.
  • Aggregated questions. Some questions ask for a number, not for records: how many of them fall into a given phase. Those are answered by an aggregate over the structured fields.
  • Grounded answers. The model answers from the retrieved records and refers back to them, so a reader can check where each statement comes from.
  • Architecture and delivery. I owned the architecture and led delivery; a dedicated development team built it.

The pattern carries over to any records with fields plus free text: service tickets, maintenance logs, claims, audit findings, customer feedback.