@devries-cameron20 / composio Mirror · read-only / commits / 95bca88ac
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 14:45 UTC

fix(docs): deduplicate and clarify knowledge search results (#4203)

## Summary Knowledge search indexes pages as section-level records. Exact and keyword-only retrieval returned those chunks directly, so a query such as `gmail` could show repeated cards and promote raw subsection names without their page context. Markdown comments inside fenced code blocks could also be mistaken for headings, producing labels such as `Using array format`. This makes keyword result finalization consistent with hybrid search, gives each match a clear page → section → excerpt hierarchy, and keeps code examples searchable under their real document headings. ## Changes - Deduplicate keyword-only results by canonical page while preserving keyword rank order - Fill the result list from the full candidate set after deduplication - Promote exact titles and identities above incidental body mentions on the exact-match fast path - Keep the page title primary and show a distinct matched section as supporting context - Normalize Markdown in displayed section labels and remove repeated prefixes or dangling separators - Ignore heading-like comments inside fenced code when building section records while retaining the code in searchable content - Rebuild the semantic artifact from the corrected section boundaries - Add regressions for ranking, result fill, rendered card behavior, and fenced-code parsing ## Type of change - [x] Bug fix - [ ] New feature - [ ] Refactor/Chore - [x] Documentation - [ ] Breaking change ## How Has This Been Tested? - `cd docs && bun run test` — 472 passed, 0 failed - `bun run types:check` - `bun run lint` - `bun run lint:links` — 0 errors - `bun run check:kb-semantic` — artifact current at 876 records - `bun run build` — 2,116 static pages generated - Local API and rendered-page smokes for `gmail`, `user_bob`, and `using array format` ## Screenshots (if applicable) The Vercel preview generated for this PR can be used to verify the search result cards. ## Checklist - [x] I have read the Code of Conduct and this PR adheres to it - [x] I ran linters/tests locally and they passed - [x] I updated documentation as needed - [x] I added tests or explain why not applicable - [x] Changeset not required (docs-only change) ## Additional context The semantic artifact changed from 1,033 to 876 records because 157 fake document sections created from comments inside fenced code blocks were removed. Their code content remains indexed under the correct parent sections.

Soham Basu committed Aug 21, 2026 at 19:07 UTC 95bca88acf1c36ff727fa9cad9d8008a4702763a

No changes.