Build your agent
Import checker
When a document-like source is imported — pasted text, a Google Doc, a Notion page — Blengi runs an advisory check on it and shows a short summary of adjustments on the source row: suggestions that would make the document answer better. The checker never modifies the document, never blocks an import, and its findings are suggestions to review, not errors.
What it checks
| Finding | Why it matters |
|---|---|
| No headings | Long documents without headings chunk poorly — facts from different sections blur together in retrieval. Use a heading per section or product. |
| Prices found | Prices hardcoded in documents go stale the moment the shop changes. Refer to the product page instead; the crawler keeps that current. |
| Unfilled placeholders | [fill in]-style tokens left over from a template end up verbatim in answers. Bracket notation used consistently (3+ times) is recognised as intentional and not flagged. |
| Materials list doesn't sum | A composition list totalling e.g. 85% will be recited as if complete. The checker flags any 3+-percentage line summing outside 95–105%. |
| Encoding damage | Mojibake (é, €) from a bad copy-paste corrupts retrieval for every affected word. |
| Oversized sections | A single section far beyond the chunk budget fragments into pieces that lose their context. |
| Products without sizes | A product register whose product sections carry no Maten: / Sizes: line. Sizes are what let the assistant say a product is not available for this visitor instead of guessing — without them it will cheerfully price a size the shop does not stock. Only registers are checked; an FAQ or policy page is never asked for sizes. |
| Advisory (AI) | One model pass looks for internal contradictions, sections mixing multiple products, and unfinished sentences. Best-effort: if the model is unavailable, the deterministic findings above are still saved. |
Existing knowledge bases
Product facts are parsed when a source is imported, so a register that was already in place before this shipped has none yet. Rather than re-importing (which re-fetches and re-embeds the whole source), backfill from the text already stored:
php artisan knowledge:extract-product-facts --dry-run
php artisan knowledge:extract-product-facts --agent=<agent-uuid>
--dry-run reports what it found and writes nothing. Either
way the output ends with the list of products that carry no size line —
that list is the thing to fix in the register.
"Fix it for me"
Two findings come with a one-click remedy on pasted-text sources: No headings found and very long section(s). Click Fix it for me next to the finding and a proposal appears side by side with the current text. Nothing is saved until you click Apply & re-index, which goes through the ordinary edit flow (save, re-index, re-check).
How the proposal is made, in order: first a rules pass for FAQ-shaped
text — Vraag: / Antwoord:, Q: /
A:, or short lines ending in a question mark — where each
question becomes a ## heading and the answer label is
dropped; nothing else moves. Only when the text is not FAQ-shaped is
the AI asked to insert headings, and its answer is accepted only if
stripping the headings it added gives your original text back word
for word. A proposal that "improved" a sentence is rejected with a
message, and you add the headings by hand instead. Documents over
60,000 characters are not sent to the AI.
Where the report lives
On the agent's Sources page, each checked source shows
either “Document check: no suggestions” or an expandable
“N suggestions to improve this document”. The report is stored
on the source (check_report + checked_at) and
refreshes on every re-import or reindex of the source.
Scope
Document-like sources only: pasted text, Google Docs and Notion pages. Crawled website pages are deliberately excluded — marketing copy plays by different rules than knowledge documents, and flagging every price on a product page would be noise. The check runs on the queue after indexing; it adds nothing to visitor response times.