Limited Availability
← Gnok home

Answer questions from your policies

A customer asks how to get a refund. Search the support collection, retrieve the relevant policy, and give a language model those passages to draft an answer a support agent can check.

The selected query retrieves support documents and the result tells the reader to contact support within 30 days of purchase.
The synthetic refund policy specifies a 30-day window, the original payment method, and a five-business-day processing time.

Find the passage behind the answer

Start with five documents, filter to support policies published since January 2026, then rank the remaining rows by their embedding distance from the question. Filtering keeps an unrelated financial or legal document out of the answer context.

Recorded matches for “How do I get a refund?”
DocumentCosine distance
Refund Policy0.5137
Shipping FAQ0.8524

The smaller distance puts the refund policy first. The agent can check the wording of the proposed answer against that passage. Run the vector search and retrieval tutorial

Combine keywords with meaning

For a technical knowledge base, exact terms can matter as much as meaning. Rank articles once with BM25 and once by embedding distance. Reciprocal rank fusion combines their positions into one list.

A hybrid SQL query ranks five articles. Vector indexes with HNSW appears first, followed by Distributed shuffle exchanges.
For “fast nearest neighbor search,” the HNSW article leads the recorded five-article example.

Build a hybrid search query