# Company knowledge bases for RAG

> To seed a company knowledge base for RAG, start with a list of which companies belong in it. One SimilarIQ search on a company's domain returns up to 100 ranked look-alikes with domain, match score, relationship type and confidence for $0.25. Use those domains as the crawl manifest and the scores as chunk metadata. SimilarIQ supplies the list, not the documents.

Source: https://similariq.ai/use-cases/rag-knowledge-base · Updated 2026-11-25

## The job: decide which companies go into the corpus

A retrieval system that answers questions about a company's market is only as good as the set of companies it has documents for. Ask it how a client compares with its rivals and it will retrieve whatever it holds. If the corpus contains the client and three famous competitors, the answer will be about those three, stated with confidence, and the nine other rivals that matter will be absent.

Teams usually define the corpus by hand. Someone lists the competitors they can think of, an engineer points a crawler at those sites, and the list is never revisited. Coverage gaps in a RAG system are silent. The model does not say that a competitor is missing from the index. It answers from what it has.

The corpus definition should be a data step with an auditable input and output. Given a focal company, produce the set of related companies, with enough structure to decide how deeply to ingest each one. That is the part a look-alike search does. Fetching and indexing the documents stays with you.

## What the search contributes to a retrieval pipeline

SimilarIQ takes a domain and returns up to 100 companies. Each row has `rank`, `company`, `domain`, `matchScore` from 0 to 100, `type` (Direct, Indirect, Adjacent or Emerging), `confidence` from 0 to 100 and `likelyCompetitor`. The response includes a `searchId`.

In pipeline terms this is a manifest plus metadata. The `domain` values are the crawl targets. The `type`, `matchScore`, `confidence` and `likelyCompetitor` values become attributes you attach to every chunk from that company. The `searchId` is the provenance record for why a company is in the corpus at all.

It is not content. SimilarIQ returns no page text, no company descriptions, no news, no financials and no firmographics. It does not crawl the sites for you or produce [embeddings](https://similariq.ai/glossary/embeddings). If your knowledge base needs product pages, pricing pages, documentation and blog posts, your own crawler or a web extraction tool fetches them, subject to each site's terms and robots rules.

## The workflow, step by step

Run a search on the focal company. With the Python SDK that is a single `search` call after `pip install similariq`. With the REST API it is `POST https://similariq.ai/api/v1/search` with `{"domain":"stripe.com","limit":100}`. It takes roughly 30 to 60 seconds. Store the full response as a JSON file next to your corpus.

Apply an inclusion rule to turn 100 rows into ingestion tiers. A reasonable starting rule: ingest deeply any Direct result above your match score and confidence floors, ingest a few key pages for Indirect and Adjacent results above the floors, and record the rest as names only. Depth here means how many pages per company you fetch.

Crawl by tier, chunk the pages, and write each chunk with metadata: the company's domain, its relationship type to the focal company, the match score, the confidence, the search ID and the fetch time. Then insert a small structured record per company, a single chunk that states the relationship in plain words. That record lets retrieval answer who the competitors are without relying on scattered page text.

- Tier 1, deep crawl: Direct, above both floors.
- Tier 2, key pages: Indirect and Adjacent, above both floors.
- Tier 3, name only: everything else, kept in the manifest.
- Always: one structured relationship record per company.

## Using the scores at query time

Metadata earns its place when you filter on it. A question about head-on rivals should restrict retrieval to chunks where the type is Direct. A question about where the market is heading can widen to Adjacent and Emerging. Without the filter, [vector similarity](https://similariq.ai/glossary/vector-similarity) alone will rank chunks by wording, and a loosely related company with well-written pages can crowd out a close rival with a thin site.

Match score works as a tie-breaker and as a cut-off. When the retriever returns candidates from fifteen companies, re-rank so chunks from companies with higher match scores come first, or drop companies below a floor entirely. Confidence is the right gate for assertions: instruct the generator to describe a company as a competitor only when the stored confidence clears your threshold.

Keep the scores relative to the focal company. A match score of 82 means similar to the seed of that search. If one index serves several focal companies, the same competitor will have different scores for each, so key the metadata by the pair of focal company and related company, not by the related company alone.

## An AI-agent version

An agent can build and maintain the manifest through the hosted MCP server at `https://similariq.ai/mcp`. To set up a new workspace it calls `find_similar_companies` on the focal domain for one credit. For a batch of clients it calls `start_bulk_search` at one credit per domain and polls `get_bulk_job`. Later reads use `get_search_results` and `list_recent_searches`, which are free.

At query time there is a second pattern that avoids a static corpus for long-tail companies. The agent first checks its index. If the focal company has no manifest, it runs a search, waits, and uses the returned list to drive a targeted web fetch with its own browsing tool before answering. This is slower, so reserve it for companies outside your precomputed set.

Make the agent distinguish its sources in the answer. The list of related companies and their labels came from a SimilarIQ search with a specific ID. The descriptions of what each company does came from crawled pages. Anything else came from the model. The MCP tools are listed on the [MCP server](https://similariq.ai/features/mcp-server) page.

## Cost model with worked numbers

One search costs $0.25, which is $0.0025 per look-alike at 100 results. The manifest for one focal company is therefore $0.25. A product with 40 client workspaces pays 40 times $0.25, or $10.00, to define every corpus, which is exactly the minimum deposit. Refreshing all 40 each quarter is 160 searches a year, or $40.00.

For better coverage, add a second hop: search the 3 highest-scoring Direct results for each focal company and merge. That is 4 searches per workspace, or $1.00, and $40.00 for 40 workspaces. Your crawling, embedding and storage costs are separate and will usually be larger than the manifest cost.

Reading stored searches is free, so rebuilding an index from an existing manifest spends no credits. Failed searches return a 502 and the credit is refunded. The balance never expires, and API, SDK, CLI and MCP usage all draw on it at the same price.

## Metrics and pitfalls

Evaluate corpus coverage separately from answer quality. Write a set of questions whose correct answers name specific competitors, and check whether those companies are in the manifest before you check whether the model mentioned them. A company missing from the manifest is a seeding problem. A company present but not retrieved is a retrieval problem.

The main pitfalls are staleness, false completeness and score misuse. A manifest is a snapshot of one research pass, so set a refresh interval. The list is capped at 100 and is not a census, so the system should never claim it lists every competitor. And low-confidence rows ingested at full depth will surface in answers as if they were established rivals.

- Share of expected competitors present in the manifest.
- Retrieval hit rate on competitor questions, by tier.
- Answers citing a company with no manifest entry.
- Chunks per company by tier, to catch crawl imbalance.
- Age of the oldest manifest in production.
- Manifest cost versus crawl and embedding cost.

## Getting-started checklist

Use the 2 free searches to build one manifest end to end for a company you know well, and inspect the tiers before crawling anything. The reasons a model should not supply this list from memory are in [why not just ask an LLM for competitors](https://similariq.ai/guides/why-not-just-ask-an-llm-for-competitors). Notes for the people who build these systems are on the [AI engineers](https://similariq.ai/roles/ai-engineers) page.

- Search the focal company and store the raw JSON.
- Set match score and confidence floors.
- Assign each row to a crawl tier.
- Crawl with your own tooling and respect site rules.
- Attach type, scores, search ID and fetch time to every chunk.
- Add one structured relationship record per company.
- Schedule a refresh and test coverage with known answers.

## Frequently asked questions

### How do I build a competitor knowledge base for RAG?

First define which companies belong in it, then fetch and index their documents. A look-alike search on the focal company gives you up to 100 related domains with relationship labels and scores. Crawl those domains with your own tooling and attach the labels to each chunk as metadata.

### Does SimilarIQ provide the documents or embeddings?

No. It returns a ranked list of companies with domain, match score, relationship type, confidence and a likely-competitor flag. Page content, chunking, embeddings and the vector store are parts of your own pipeline.

### What metadata should I store on each chunk?

Store the company's domain, its relationship type to the focal company, the match score, the confidence score, the search ID and the time the page was fetched. Those fields let you filter retrieval by relationship and trace why a company is in the corpus.

### How much does seeding a corpus cost?

One search per focal company at $0.25. Forty workspaces cost $10.00 to seed, and a quarterly refresh of all forty is $40.00 a year. Crawling and embedding costs are separate.

### How often should the company list be refreshed?

Choose an interval that matches how quickly the market changes, and record the fetch time so the system can report the age of its data. Each refresh is a new search and costs one credit, while re-reading the previous result is free.

### Can the agent run a search at query time instead?

Yes, through the MCP tool `find_similar_companies` or the REST API. A new search takes roughly 30 to 60 seconds, so this suits long-tail companies outside your precomputed set more than interactive answers.
