RAG & Knowledge Systems
Answers from your own documents, with the source one click away
We build retrieval-augmented generation systems that search policies, manuals, contracts and wikis, respect who is allowed to see what, and cite the passage behind every answer. When the documents do not hold the answer, the system is built and tested to say so instead of guessing.
AI & Data
What is retrieval-augmented generation (RAG)?
Retrieval-augmented generation (RAG) is an architecture in which a language model answers questions using passages retrieved from a defined set of documents rather than from its training data alone. The system indexes your content, finds the most relevant sections for each question, passes them to the model and returns an answer with citations to the original sources.
The answer to most internal questions already exists somewhere: a clause in a policy PDF, a page in an equipment manual, a resolved ticket or a wiki note from the last time someone asked. Finding it means knowing which drive to open and which words the author used. A RAG system makes that content answerable in plain language while keeping every answer traceable to a document someone can open and check.
The quality of a RAG system is decided long before the model writes a word. How documents are parsed, split, labelled and indexed, how search combines exact keywords with meaning, and how results are filtered by permission determine whether the right passage is found at all. That retrieval layer is where we spend most of our engineering time.
We measure retrieval and answers separately, using questions written with your subject experts. That shows whether a wrong answer came from a missing document, a search miss or the model, so each fix lands in the right place. The same knowledge layer can then serve a search page, an internal assistant, a customer chatbot or an agent.
Challenges
The problems we are usually brought in to solve
Answers nobody can verify
Without citations, staff cannot tell a correct answer from a confident guess, so they either stop using the tool or act on an error.
Documents never written for machines
Scanned PDFs, complex tables, repeated page headers and multi-column layouts break naive text extraction and feed the model the wrong fragments.
Confidential content crossing team lines
One index over everything can surface HR, finance or client files to people who should never see them unless permissions are enforced at retrieval time.
Stale and conflicting versions
Old policies, drafts and duplicates sit beside current documents, and the system cites last year's process as confidently as this year's.
Search that misses exact terms
Pure vector search can overlook product codes, clause numbers and acronyms that a simple keyword search would have matched.
Wrong answers with no diagnosis
When an answer is wrong, teams cannot tell whether the document was missing, retrieval failed or the model misread a correct passage.
Capabilities
What the service covers
Document ingestion and parsing
Connectors and parsers for PDFs, Word files, spreadsheets, web pages, wikis and ticket exports, including OCR for scanned pages and table-aware extraction.
Chunking and metadata design
Content split along headings, clauses and sections, with each chunk tagged by source, owner, date, version and access label.
Hybrid search and reranking
Keyword and vector search combined, followed by a reranking step, so both exact terms and paraphrased questions reach the right passage.
Permission-aware retrieval
Access rules synced from your identity provider or source systems and applied as filters on every query, so people only retrieve what they may open.
Cited, grounded answers
Answers that quote and link the passages they rely on, with checks that make the model decline when the sources do not support a reply.
Freshness and re-indexing
Scheduled and event-driven sync that adds new documents, re-processes edited ones and retires superseded versions before they can be cited.
Retrieval and answer evaluation
Question sets built with subject experts that score whether the right passage was found and whether the answer stays faithful to it.
Multilingual knowledge bases
Indexing and querying across English, Arabic and Urdu content, so a question in one language can find a source written in another.
Knowledge APIs for other channels
A retrieval service that a staff portal, chatbot, agent or workplace chat tool can call, so content is indexed once and reused everywhere.
Our process
How an engagement runs
Every engagement has a named lead, a written scope and working software to review every one to two weeks.
- 01
Content audit
We inventory sources, formats, owners, access rules and update frequency, then agree what is in scope for the first release and what stays out.
- 02
Question set with subject experts
Your experts write realistic questions and point to the documents that answer them, giving us a test set before any indexing begins.
- 03
Ingestion and retrieval build
Parsers, chunking, metadata, hybrid search and permission filters are built and tuned until retrieval scores are acceptable on the question set.
- 04
Answer layer and interface
We add the generation step, citation display, feedback controls and the chosen interface, with refusals when sources are insufficient.
- 05
Pilot and content feedback loop
A pilot group uses the system while unanswered and down-voted questions are reviewed weekly, exposing gaps in the documents as well as in retrieval.
Technology
Technology we use
Chosen per project for fit, maintainability and your team's ability to own it.
Models and embeddings
- OpenAI
- Azure OpenAI
- Gemini
Retrieval and storage
- PostgreSQL
- pgvector
- Qdrant
- Elasticsearch
Pipelines and APIs
- Python
- FastAPI
- LlamaIndex
- n8n
Hosting
- Docker
- Kubernetes
- Microsoft Azure
- AWS
Use cases
Where it makes the biggest difference
Policy and HR handbook assistant
Staff ask about leave, expenses or procedures and receive the relevant clause with a link to the current version of the policy.
Technical manual search for field teams
Engineers and technicians query equipment manuals and service bulletins from a phone, with the page and section reference returned.
Support team knowledge copilot
Customer service staff see suggested answers sourced from product documentation and resolved tickets while they work on a case.
Contract and clause lookup
Legal and commercial teams locate specific obligations, renewal terms or liability clauses across a library of agreements.
Onboarding knowledge base
New starters ask how things are done and get answers drawn from wikis, process documents and recorded decisions.
Regulatory guidance reference
Risk and compliance teams search internal interpretations alongside external guidance, with each answer tied to the exact section it quotes.
Industries
Industries we apply this to
Why Softweb Planet
Why teams choose us for this work
Retrieval engineering first
Our senior AI/ML engineer and backend developers treat parsing, indexing and search as the core of the system, which is where most RAG quality problems are solved.
Hosting set up by cloud engineers
In-house DevOps and SRE engineers configure identity, network isolation, secrets and logging in your AWS, Azure or Google Cloud account, so the index, source copies and access logs stay in an environment you control.
Evidence on your own questions
You see retrieval and answer scores on questions your experts wrote, reviewed with a named lead against working software every one to two weeks.
Candid about document gaps
When the content needed for an answer is missing or contradicts itself, we report it to the content owner rather than hiding it behind generated text.
What you can expect
- Answers that staff can check against the source document in one click
- Knowledge access that follows existing document permissions
- Clear visibility of the questions current documentation cannot answer
- One indexed knowledge layer reused by search, assistants and chatbots
RAG & Knowledge Systems FAQ
Frequently asked questions
RAG looks up your documents each time a question arrives, while fine-tuning changes the model's behaviour through additional training. For company knowledge that changes, RAG is usually the right choice: updates take effect as soon as a document is re-indexed, every answer can cite its source and access can be restricted per user. Fine-tuning is better for teaching a style or output format, and the two can be combined.
A RAG system can use almost any source that can be turned into text, including PDFs, Word and PowerPoint files, spreadsheets, web pages, wikis, ticket histories and database records. Scanned documents need OCR and complex tables need dedicated parsing, which we plan for during the content audit. Sources are connected through APIs, exports or scheduled sync from shared drives and document management systems.
We filter by permission inside the search query itself, so restricted passages are never retrieved for that user and never reach the model. Every chunk carries the access groups of its parent document, and the user's groups are checked at query time. We avoid filtering after search, because it can leave too few results or let restricted text slip into cached summaries. Documents with unclear access stay hidden by default, and we test with an account for each role before launch.
Each answer lists the passages it was built from, with links to the original document and, where possible, the page or section. The model is instructed to rely only on retrieved passages, and we check automatically that cited sources actually support the answer. Users can open the source in one click, which is the quickest way for them to verify a reply and build trust in the system.
The system is designed to say it could not find an answer in the available sources, and we test that behaviour with questions the documents cannot answer. If retrieval returns nothing relevant, the model is told not to guess and the question is logged as unanswered. Those logs are reviewed with content owners and often reveal missing or outdated documentation that is worth fixing regardless of the AI system.
We measure retrieval quality and answer quality separately, using a question set written with your subject experts. Retrieval is scored on whether the right passages appear among the top results, and answers are scored on correctness, faithfulness to the sources and citation accuracy. Scores are tracked on every change to chunking, search settings, prompts or models, and production feedback adds new questions over time.
We choose the vector store based on your existing stack, data volume and hosting needs. PostgreSQL with pgvector suits many projects because it keeps vectors, metadata and permissions in a database your team already knows. Dedicated engines such as Qdrant, or Elasticsearch for combined keyword and vector search, make sense at larger scale or with heavier filtering. We design the retrieval layer so the store can be swapped later.
Documents stay current through scheduled or event-driven sync with the source systems. New files are indexed automatically, edited files are re-processed, and deleted or superseded versions are removed so they cannot be cited. We also store dates and version labels with each passage, which lets the system prefer the latest policy and shows owners when their content was last refreshed.
Yes, provided the embedding and language models handle those languages well, which we confirm by testing on your own content. Documents in English, Arabic and Urdu can share one index, and a question in one language can retrieve sources written in another. We evaluate each language separately, because retrieval quality and answer fluency can differ, especially with right-to-left text and mixed-script documents.
Yes. Both the embedding model and the language model can be open models running on GPU servers in your own cloud account or data centre, so no content leaves your environment. The trade-offs are real: open models may handle complex questions less well than leading hosted models, GPU servers cost money even when idle, and you take on model updates. A middle route is Azure OpenAI in a region you choose. We run your question set on each option so the decision rests on measured quality.
Usually yes, although long context windows move the line. Sending a whole library with every question is slow and expensive at volume, cannot apply per-user permissions and makes citations less precise. For a handful of documents that rarely change, passing them in full can be the simpler design, and we recommend it when it scores as well on your questions. Many systems now combine both: retrieval narrows the library, then the model reads longer sections around each match.
Yes, and the cause is usually retrieval rather than the model. We run a question set through your prototype and check, for every wrong answer, whether the right passage was retrieved at all. Common culprits are text lost during PDF extraction, chunks cut through the middle of a table or clause, no keyword search for codes and acronyms, and too many loosely related passages sent to the model. Fixes are then made one at a time and measured against the same questions.
A pilot over one well-defined document set, such as a single department's policies, can often be with users within a few weeks of discovery. What stretches the timeline is the content rather than the model: scanned or table-heavy files that need careful parsing, permissions that differ from document to document, and the time subject experts need to write the question set. Each further source is connected only after its own questions score acceptably.
Build cost is fixed in a quote after discovery and depends mostly on how many sources need connectors, how hard the documents are to parse and how complex the permissions are. Running cost is driven by questions more than documents. Embedding the library is a one-off cost repeated only for changed files, while every question pays for retrieval, optional reranking and a model call sized by how many passages are sent. We estimate both from your volumes before you commit.
Keep exploring
Related services and solutions
Start your project
Tell us what you're building.
Share the problem, the systems involved and where you want to be. A senior engineer replies with honest advice on scope, architecture and the fastest safe path to production.