AI & Automation

Private AI Knowledge Base (RAG) in Rawalpindi

A chat assistant that answers from your PDFs, wiki and tickets, shows where each answer came from and respects who may see what.

Private AI Knowledge Base (RAG) by Solfreaks
Solfreaks KnowledgeBot

Solfreaks KnowledgeBot is a chat assistant that answers questions from your own documents and shows the source of every answer. Staff or customers ask in plain language, the system finds the relevant passages in your PDFs, Word files, wiki pages, help centre or tickets, and a language model writes an answer from those passages and nothing else.

The technique is called retrieval-augmented generation, or RAG. A demo takes a day. What takes engineering is a version that answers correctly on messy company documents, respects who may see what and stays current, and that's the part we're selling.

What's included

  • Document ingestion. Connectors for where your files live, such as shared drives, Google Drive, a wiki or your help centre, with OCR for scanned PDFs.
  • Cleaning and chunking. Repeated headers and old duplicate versions removed, and documents split along headings and tables, not at arbitrary character counts.
  • Search that finds the right passage. Embeddings stored in a vector database such as pgvector or Qdrant, combined with keyword search and re-ranking, because policy numbers and product codes need exact matches.
  • Source citations. Each answer links to the document and page it came from, so people can check it.
  • Access rules. Permissions per user and per team are applied before the model sees anything, so an HR file can't turn up in a sales chat.
  • A chat front end. A web chat for staff, an embeddable widget for customers, or an API for your own app.
  • An admin screen. What has been indexed, what failed, what people asked and which questions found no answer.

Keeping it private and keeping it honest

Private means you decide where the data lives. We can run the whole system on a server you own or in a private cloud account in your name, using an open-weight model when documents can't leave your network. If you prefer a hosted model, we use the provider's business API terms, which currently say that API data isn't used for training; we check that for the specific provider and plan, and we send only the passages needed for each question, never the whole library.

Models sometimes state things confidently that aren't in the documents. We reduce that by telling the model to answer only from the retrieved passages, to say it couldn't find the answer when the sources are silent and to cite what it used. We can't reduce it to zero. For legal, medical or financial questions, the assistant supports a person who checks the source. Solfreaks builds software and doesn't give legal, medical or financial advice.

Documents change, so the index must too. We re-index when files change, drop what's deleted and prefer the newer version when two documents disagree.

How it gets built

  1. Audit the documents. What exists, where, who owns it and who may see it. This is often the slowest step, because the documents are in worse shape than anyone remembers; allow a week or two.
  2. Collect real questions. Staff or support agents give us questions they actually ask, with the correct answers. This becomes the test set.
  3. Build the pipeline. Ingestion, search, answer generation and permissions, typically over three to six weeks for a first working version.
  4. Measure and tune. We score answers on correctness and on whether the right source was found, then adjust chunking, retrieval and instructions until the numbers stop improving.
  5. Pilot with a small group. Real users find real gaps within days. We fix those, then widen access.

When it earns its keep, and when it doesn't

It suits internal helpdesks for HR or IT, sales teams who hunt for the latest product sheet, support teams with large help centres, and policy and compliance Q&A.

You don't need this if you have a few short documents (a good search page or FAQ does the job), if your documents are out of date or contradict each other (the assistant will repeat the contradiction), or if you need exact figures from a database, where a proper report is the right tool. When the assistant should also take actions, such as raising a ticket, it grows into an AI agent. Customers who prefer to ask over chat can reach it through WhatsApp too.

Budget and schedule for a knowledge base

Price follows the number and condition of your documents, how many sources we connect, how complicated your permissions are, where it's hosted, how many languages are involved (Urdu or Arabic documents need extra testing) and which interface you want. Hosting and model usage are running costs on top of the build. Fixed scope suits the first release, and a monthly plan covers hosting, monitoring, re-indexing and tuning. The quote follows a short discovery call.

Why us for a document assistant

In a small Rawalpindi team like ours, the people you speak to on the call are the people who build it. We've published apps on Google Play, so we've lived with real users' bug reports and build the admin screen and logs with that in mind. The index, the code and the hosting accounts are yours. If you have a pile of documents and a pile of repeated questions, talk to us about them.

Open-source tools and references

A few public projects that come up a lot in this kind of work. They belong to other people and teams. We link to them because they are worth a look, not because anyone pays us to.

Frequently asked questions

Can the assistant be limited to certain people and teams?

Yes, and it's one of the main reasons to build one properly. Each document carries the permissions of its source, and the search filters results by who is asking before the language model sees a word. We test this with deliberate attempts to pull out restricted material. If your source permissions are messy, we'll flag that in the audit, because the assistant can only enforce rules that someone has defined.

Will our documents be used to train a public model?

Not by us. With a self-hosted model nothing leaves your servers. With a hosted model we use business API plans whose terms currently say they don't train on your data, and we confirm that for the specific provider and plan before sending anything. We also send only the passages relevant to each question. Terms change, so we note what applied on launch day.

How do you reduce wrong or invented answers?

The model is told to answer only from retrieved passages and to say so when it can't find the answer. Every answer shows its sources, so mistakes are easy to catch. Before launch we score the system against real questions from your staff and keep adding failures to that set. It won't reach perfection, and for decisions with legal or financial consequences someone should still check the cited source.

What happens when a document changes or is deleted?

The index follows. Where the source system allows it, a change triggers re-indexing of that file soon after; otherwise a scheduled job syncs overnight. Deleted files are removed so they can't be quoted, and when two versions conflict the newer one is preferred and the older is flagged. The admin screen shows what's indexed and what failed, so stale content doesn't sit unnoticed.

Do you need to see our documents before quoting?

Not all of them. For a quote we need an overview: roughly how many files, which formats, where they live, whether any are scanned images and who should see what. A sample of ten or so representative documents helps us judge quality. Confidential material can stay on your side until an NDA is signed and we've agreed how it will be handled.

Talk it through with us

Tell us what you are building and where it hurts. You get a straight answer, a plan and a price, and if we are not the right people we will say so.

Trusted by teams & brands

Let's build

Have an idea or project? let's talk

Chat with us