Repository navigation
feat(platform): ground chat answers about Tale in its documentation - #3773
Merged
Merged
Conversation
Asked how to use Tale itself, the chat assistant had nothing but its own guess of a docs.tale.dev address. Folder paths, /en prefixes and invented slugs all answered 404, and because failed steps are never hidden, the timeline filled with red "The server answered 404" reads before a reply that was often wrong anyway. The persona now says the workspace runs on Tale and points how-to questions at the documentation index (https://docs.tale.dev/llms.txt, one line per page with its description) and the pages it lists, with the /de/ and /fr/ prefixes for German and French. It never guesses a docs URL and says the docs describe the latest release. The origin is fixed rather than derived from the deployment's own site origin, which on a self-hosted install would name a docs host that does not exist. web_fetch already reads the text/markdown pages the index links. The persona test allows exactly that one address and still bans every other; CHAT-F51 covers it by hand.
…-3773 # Conflicts: # services/platform/tests/manual/readme.md
# Conflicts: # services/platform/tests/manual/readme.md
The docs index is about 28,000 characters, more than one 20,000-character web_fetch window, and the wire description told the model to keep paging until nextOffset is absent. With four tool rounds per turn, a search, two index windows and one page left no room for a second page. The web_fetch description now treats an index of other pages as a lookup: stop reading once the needed link is found, then fetch that page. The description also accepts a URL the instructions name, so it agrees with the persona that points at the docs index. The index URL becomes one exported constant that the prompt interpolates and the test imports, and the docblock records why this one product fact lives in the persona.
The chat basics page said the assistant always reads docs.tale.dev. The lookup is an outbound fetch, so a self-hosted server without internet access shows a failed reading step instead. The page now says so in all three locales. The German line also uses du-voice "dein Arbeitsbereich" from the glossary instead of plural "eure Instanz".
Every open change bumped the same box-count lines in the manual readme, so each merge conflicted with the rest. The totals are recounted once after the batch lands.
This was referenced Oct 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When asked how to use Tale itself ("Wie erstelle ich einen API-Key in Tale?"), the chat assistant could only guess a docs.tale.dev address. Folder paths,
/enprefixes and invented slugs all returned 404. Failed steps are never hidden, by design, so the timeline filled with red "The server answered 404" reads. Customer feedback described this as "many 404 errors when querying docs.tale.dev".The persona now has one short paragraph that says:
https://docs.tale.dev/llms.txt(one line per page, with its description), then a page it lists (/de/or/fr/after the host for German or French);The index URL is one exported constant,
TALE_DOCS_INDEX_URLinlib/chat/assistant.ts. The prompt interpolates it and the test imports it. The origin is fixed on purpose and never derived from the deployment's own site origin. On a self-hosted install,docsOriginForSite(TALE_SITE_URL)would name adocs.<their-host>that does not exist. The docblock says why this one product fact belongs in the persona: the wire tool descriptions stay free of real-world domains.The
web_fetchwire description changes in two ways so that it agrees with the persona:The index is about 28,000 characters, more than one 20,000-character window, and a turn gets four tool rounds. Without the lookup rule, the partial-read rule would spend a round on the second index window. The API-key entry sits in the first window.
The persona stays under its 1800-character "slim" guard (1783). Its no-URL test allows exactly the one exported address and still bans every other.
The docs page
platform/chat/basics(EN/DE/FR) says the assistant looks up the public documentation for questions about Tale. It also says that a server which cannot reach docs.tale.dev (for example a self-hosted install without internet access) shows a failed reading step, and the answer is then not grounded in the documentation. The German line now uses the glossary term and du-voice ("dein Arbeitsbereich").The branch merges current
main. The manual-suite index intests/manual/readme.mdwas rebuilt from the real box count of every suite. An earlier conflict resolution had dropped thechatandconnectorsrows and left a stray sentence in the table. The rebuilt index lists all 21 suites and adds up to 925 boxes: chat 90 withCHAT-F51, plus data-residency 26 and knowledge 54, whose counts were already stale onmain.Pairs with #3769, which makes guessed docs addresses (folders,
/en,/de/llms.txt) redirect instead of returning 404.Follow-ups, not in this PR:
suites/responsive.mddeclares 28 boxes in its header but holds 32. This drift is already onmain.lint:manualdoes not check that every suite has exactly one index row with a matching count, which is how the broken table went unnoticed.Checklist
bun run checkpasses: not run repo-wide (the machine is shared and loaded), so CI runs it. All chat server tests pass (lib/chat,backend/core/chat,backend/domains/chat: 44 files, 754 tests), and so do the docs tests (35 files, 171 tests), the platform typecheck and typed oxlint on the touched files.bun run lint:sastpasses: the scoped Opengrep hook ran on the staged files.docs/{en,de,fr}/platform/chat/basics.md.Test plan
bun run --filter @tale/platform test -- lib/chat/assistant.test.ts lib/chat/tools.test.ts: the tests pin the grounding (the exported index address, "never guess a docs URL", the latest-release caveat), theweb_fetchindex-as-lookup rule and its acceptance of a URL the instructions name. With the source change stashed, four of these tests fail; with it they pass. The slim guard, the no-other-URL guard and the no-real-domain guard on the wire descriptions still hold.bun run lint:manualandtests/manual/scripts/check-guide.ts suites/chat.mdpass. A script checked that every suite has exactly one index row whose count matches its- [ ]boxes, and that the total is 925./llms.txtreturns 200 (27,995 characters) and lists the API keys page within its first 20,000 characters./platform/admin/api-keys.mdand its/de/and/fr/versions return 200text/markdown.web_fetchexecutor: it read the public index in two windows and then the linked API-key guide in EN/DE/FR. The docs page renders without errors at phone and desktop widths.CHAT-F51.Not verified: a live chat turn against a real model, including whether the model stops reading the index early. The behaviour is set by the prompt, and
CHAT-F51is the check for it. The failure path on a server without internet egress is the existingweb_fetchfailure step; it was not observed on an air-gapped install.