Goal
Add an AI-powered search feature to kitconcept.solr: single-turn RAG (Retrieval-Augmented Generation). The user asks a question in natural language and receives a natural-language summary answer together with the list of source documents the answer is based on. This replaces the current search experience for sites that enable it (e.g. large intranets with heavy documentation), and is a no-op for sites that don't configure it.
MVP scope
- Single-turn only: one question → one answer + sources. No conversation state.
- Built into
kitconcept.solr (backend + @kitconcept/volto-solr), not a separate plugin. Feature is off unless configured.
- Embeddings and answer generation via two endpoints of an Ollama-compatible server (embedding model, e.g.
nomic-embed-text, and a general-purpose LLM). Endpoint URL/credentials configured in the kitconcept.solr configuration — no admin UI in the MVP.
- The Solr schema groundwork already exists:
knn_vector_768 / content_vector field (added in 2.0.0a14) — currently unpopulated and unqueried.
What has to be built
- Indexing: chunk document text (structure-aware, ~500 tokens), embed chunks via the embedding endpoint, index them into Solr with security fields carried over so existing permission trimming keeps working.
- Retrieval: a new REST endpoint that embeds the question and runs a
{!knn} vector query (optionally fused with the existing keyword query, RRF) against Solr.
- Answer generation: send question + retrieved documents + prompt to the general-purpose LLM, return
answer + sources from a single @rag-search request.
- Search UI: minimal command-palette-style (⌘K) modal in
volto-solr: question input, answer panel, source list.
- Demo site: an example content corpus (export/import data shipped with the product) plus a golden set of questions with known answers/sources.
- Evaluation: retrieval metrics (Recall@k, MRR) against the golden set, plus LLM-based answer grading (faithfulness / relevancy, e.g. RAGAS) — so "is it good?" is measurable, not vibes.
Phases
- Phase 1 — retrieval foundation: embedding client, chunking, index-time embedding, knn search endpoint (returns ranked docs; no LLM answer yet). Measurable via retrieval metrics.
- Phase 2 — demo corpus + golden questions: demo site content and question/answer/source triples; retrieval evaluation harness.
- Phase 3 — answer generation: RAG endpoint returning answer + sources.
- Phase 4 — frontend: ⌘K modal UI.
- Phase 5 — quality pass: hybrid (BM25+vector) fusion if pure vector retrieval is insufficient; RAGAS-based answer evaluation; tuning.
- Post-MVP (out of scope): multi-turn chat, admin configuration UI, integration with the community LLM-connector add-on, multiple model/provider support, streaming responses.
Key open questions
See SPECIFICATION-79.md (PR to follow) for the full list — the main ones: chunk storage model in Solr (sibling docs with parent_uid vs. single-doc single-vector), pure vector vs. hybrid retrieval for the MVP, embedding model for German content (nomic-embed-text is English-trained; nomic-embed-text-v2-moe is the multilingual variant), and sync vs. async embedding at indexing time.
A detailed SPECIFICATION-79.md and IMPLEMENTATION-79.md will be added by PR referencing this issue.
Goal
Add an AI-powered search feature to
kitconcept.solr: single-turn RAG (Retrieval-Augmented Generation). The user asks a question in natural language and receives a natural-language summary answer together with the list of source documents the answer is based on. This replaces the current search experience for sites that enable it (e.g. large intranets with heavy documentation), and is a no-op for sites that don't configure it.MVP scope
kitconcept.solr(backend +@kitconcept/volto-solr), not a separate plugin. Feature is off unless configured.nomic-embed-text, and a general-purpose LLM). Endpoint URL/credentials configured in the kitconcept.solr configuration — no admin UI in the MVP.knn_vector_768/content_vectorfield (added in 2.0.0a14) — currently unpopulated and unqueried.What has to be built
{!knn}vector query (optionally fused with the existing keyword query, RRF) against Solr.answer + sourcesfrom a single@rag-searchrequest.volto-solr: question input, answer panel, source list.Phases
Key open questions
See
SPECIFICATION-79.md(PR to follow) for the full list — the main ones: chunk storage model in Solr (sibling docs withparent_uidvs. single-doc single-vector), pure vector vs. hybrid retrieval for the MVP, embedding model for German content (nomic-embed-textis English-trained;nomic-embed-text-v2-moeis the multilingual variant), and sync vs. async embedding at indexing time.A detailed
SPECIFICATION-79.mdandIMPLEMENTATION-79.mdwill be added by PR referencing this issue.