Skip to main content
Version: Peki

Knowledge

Knowledge is the reference material your agent answers from: price lists, policies, manuals, FAQs, pages of your website. You add sources on the agent's Knowledge page. For every customer message, Peki searches them and gives the model the passages that match, so the agent answers from your own documents instead of guessing.

Changes here apply to the agent right away — no publish needed. Knowledge isn't part of the draft or of versions.

Add a source​

Below the list on the Knowledge page, choose one of three kinds of source.

Upload a file​

Click Upload a file and pick one or more files.

SupportedLimit
PDF (.pdf)Up to 10 MB per file and up to 300 pages. The PDF must contain text: a scanned PDF without a text layer has nothing to read.
Plain text (.txt)Up to 10 MB, read as UTF-8.
Markdown (.md, .markdown)Up to 10 MB, read as UTF-8.
CSV (.csv)Up to 10 MB, read as text.

Peki checks the file's content, not only its name: an image or an HTML page renamed to .pdf or .txt is refused. Other types (Word, Excel, images) aren't supported. Export them to PDF, or copy the text into Write text. Any other file type fails with Use a PDF, TXT, Markdown or CSV file.

Add a web page​

Click Add a web page, enter the page's http:// or https:// address and click Add.

  • One page is read as it is now. Menus, scripts and footers are left out. Peki reads only that page, not the pages it links to. Add each page you need.
  • The page must answer within 20 seconds with a success status, and its HTML can be up to 1 MB.
  • Peki reads the HTML the server sends. Text that a page loads later with JavaScript isn't seen. If a page comes out empty or wrong, copy its text into Write text instead.
  • Pages behind a login, and private or local addresses, can't be read.
  • The page doesn't update by itself. When it changes, click Re-process.

Write text​

Click Write text, give it a title (like "Return policy") and paste or write the content.

FieldLimit
TitleUp to 120 characters
TextUp to 200,000 characters

Written text is the most reliable source: no extraction, and you control exactly what the agent reads. It can't be edited after you add it; to change it, add the new text and remove the old source.

tip

You can also attach a file in the Copilot chat and ask it to "add it to Knowledge". It creates the source after you approve the card. Automations can also add notes to Knowledge. See Automations.

Processing status​

After you add a source, Peki reads it, splits it into passages and indexes them for search. Each source shows its status:

StatusWhat it means
ProcessingReading and indexing… this usually takes a few seconds. Large PDFs can take longer.
ReadyThe agent can search it. The row shows how many passages it has.
FailedThis source could not be read. Open it to see why.

The page header shows the totals: the number of sources, the number of passages in ready sources, and when they were last updated.

Open a ready source to see what the agent actually reads: its passages, numbered, with their length. The first three are shown; click Show all to see every passage. This is the best way to check that a PDF or web page came out right.

Why a source fails​

ErrorCauseWhat to do
No readable text foundThe file or page has no text, for example a scanned PDF or a page built with JavaScript.Use a PDF with real text, or paste the text with Write text.
PDF has 412 pages; the limit is 300The PDF is too long.Split it into smaller files.
Reading the PDF took too longThe PDF is very complex.Split it, or export it again with a simpler layout.
Could not read the PDF…The PDF is damaged or protected.Export it again without a password.
The page answered HTTP 404 (or another status)The page doesn't exist or refused the request.Check the address in a browser.
Request timed out after 20000 msThe page took longer than 20 seconds.Try again, or paste the text.
Response too large (over 1000000 bytes)The page's HTML is over 1 MB.Use a smaller page, or paste the relevant text.
Requests to … are not allowed (private or local network)The address is private or local.Use a public page.

How the agent searches​

Knowledge search is automatic: it isn't a tool the model chooses to call.

  • For every customer message with text, Peki searches the agent's ready sources by meaning, not by exact words. "How long do I have to send it back?" finds a passage about "returns within 30 days".
  • Up to 4 passages are added to the model's instructions in a ## Knowledge section, each with the source's name. Passages that aren't similar enough are left out, so an unrelated question gets no Knowledge section at all.
  • The model is told to prefer these passages over general knowledge, and to say it doesn't know when they don't cover the question.
  • The search uses the customer's latest message only. A short follow-up like "and for shoes?" searches for those words alone.
  • A message with only files and no text isn't searched.
  • With personal-data protection on, the search uses the message with personal data already replaced by placeholders.
  • Each agent searches only its own sources. Two agents in a workspace don't share knowledge.

The Test panel shows which passages a reply used under Knowledge, with the source, passage number and score. See Testing.

Click Test search at the top of the page to try queries without the agent. The same search the agent runs for each message. Scores closer to 1 are better matches. It shows up to 5 results with their score, source and passage number. Nothing relevant found. The agent would answer without knowledge here. means no passage was similar enough.

Ask like a customer would: "can I pay in installments?", not "installments policy".

Re-process and remove​

Open a source to see its actions.

  • Re-process reads the source again and replaces its passages. Use it after a web page changed, or to retry a failed source. While it runs, the source shows Processing and isn't searched; it's searchable again once it's Ready. If re-processing fails, the source shows Failed and isn't searched until it succeeds.
  • Remove deletes the source, its passages and the uploaded file. The agent stops using it immediately; removed sources can't be found by any search after that. This can't be undone.

To update a file, upload the new version and remove the old one.

Credits​

Processing a source (reading and indexing it) uses credits from your workspace's balance, a little more for longer sources. Re-processing uses credits again. Searching doesn't add a separate charge, and removing a source is free.

When your workspace has no credits left, you can't add new sources: the Copilot, tests, automations and new knowledge stop with a message; nothing you built is lost. See Plans and credits and Usage.

Who can do what​

ActionRole needed
See sources and passagesAny member
Test searchOperator or higher
Add, re-process, removeEditor or higher

See Members and roles.

Tips for good knowledge​

  • One topic per section. Passages are cut at paragraph and sentence boundaries, about 1,200 characters each. A section with a clear heading and a few paragraphs on one subject makes a passage the search can find.
  • Put the answer next to the question words. "Returns: you can return items within 30 days of delivery" is easier to find than a table cell that says "30".
  • Prefer text over layout. Multi-column PDFs, tables of numbers and text inside images read badly. Check the passages, and paste clean text if they look scrambled.
  • Write FAQs as questions and answers. Customers ask questions; passages that contain the question match best.
  • Keep it current. Remove old price lists instead of adding new ones next to them, or the agent may quote both.
  • Don't put rules in Knowledge. Passages are information, not instructions, and only reach the model when they match. Things the agent must always do belong in Instructions; step-by-step procedures in Skills.
  • Use tools for live data. Stock levels, order status and appointment slots change by the minute. Fetch them with a tool.
  • Keep personal data out. Knowledge is for business information, not customer records.

Example: online store​

SourceKind
Shipping and returns policyWritten text
Size guidehttps://yourshop.com/size-guide (web page)
Product care instructionscare-guide.pdf
FAQfaq.md

A good faq.md:

## How long does delivery take?
Standard delivery takes 2–4 business days. Express delivery takes 1 business day if you order before 2 pm.

## Can I return an item?
Yes, within 30 days of delivery, if the item is unworn and in its original box. Exchanges for another size are free.

## Do you ship internationally?
We ship to the EU, the UK and the US. Shipping outside the US costs $15 and takes 5–10 business days.

Limits​

LimitValue
File size10 MB
File typesPDF, TXT, Markdown, CSV
PDF pages300
Web page HTML1 MB, 20-second timeout
Written text200,000 characters, title 120 characters
Text read from one source2,000,000 characters; the rest is ignored
Passages added to a replyUp to 4
Test search resultsUp to 5