Enterprise AI search has two parts: preparing access to information and processing requests. Some sources are indexed in advance. Others are queried through a connection when a request arrives.
Index → Process query → Retrieve → Rank → Refine → Generate
1. Index: make content searchable. Content from connected sources is collected, split into chunks, and enriched as needed for retrieval. Enrichment can extract text from scanned documents, preserve tables, and generate descriptions of images and diagrams. Each chunk is then stored in the forms that different questions need: text for keyword search, embeddings for vector search, structured fields for filtering, and in some systems a graph of entities and relationships. Metadata and the source’s permissions are stored with each chunk, and the index is refreshed as sources change.
2. Process the query: interpret the request. The system interprets the query, using relevant conversation history when available. Depending on the design, processing may include spelling correction, query rewriting, or model-based planning.
3. Retrieve: find candidates. The system searches connected sources using the supported retrieval methods. Keyword search finds exact terms, vector search finds content closest in meaning, filters narrow by structured fields, and hybrid search runs keyword and vector search together and merges the results. Configured authorization controls must prevent restricted content from reaching an unauthorized caller or the model generating their answer.
4. Rank: put the best results first. Retrieval returns candidates; ranking orders them by relevance to the query. Semantic reranking can re-score the top candidates based on how well their content addresses the question. Configured ranking rules can also use metadata to favor current, approved sources.
5. Refine: evaluate and search again (agentic retrieval). A single retrieval pass may provide enough evidence for a straightforward question. Complex requests, such as “compare our return policies across three regions and flag any conflicts,” may benefit from additional searches. Where iterative retrieval is supported, the system can assess the evidence and refine queries or consult another source to fill gaps before generating the final answer. Each extra pass adds time and cost, so systems that support it let you cap the effort per request.
6. Generate: turn retrieved content into an answer (RAG). When the goal is a written answer, selected retrieved content goes to a generative model with the question and instructions. The model uses this evidence to compose a response and can include supporting source references. This retrieve-then-generate pattern is retrieval-augmented generation, or RAG. Evaluate whether retrieval supplied the necessary evidence, then whether the answer accurately represents it.