feat(algolia-crawler): recommend helpers.markdown for RAG content#29
Open
leonardocuco wants to merge 1 commit into
Open
feat(algolia-crawler): recommend helpers.markdown for RAG content#29leonardocuco wants to merge 1 commit into
leonardocuco wants to merge 1 commit into
Conversation
Lead record-extractor.md with the Markdown pattern (helpers.markdown + helpers.splitTextIntoRecords) as the default for docs/prose — Algolia's own recommended AskAI/RAG approach. It preserves headings, lists, code, and links that a `.text()` extractor flattens away. Reframe the hand-rolled per-entity extractor as the choice for structured data (tables, catalogs). Also: note the `text` searchable attribute in rag-index-settings.md, update SKILL.md step 3, and cross-link the official Markdown indexing guide. Keeps the "tune the selector with crawler test" lesson — the generic selector grabbed only the TOC on a real site. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What does this skill do?
Adds Algolia's Markdown-for-RAG pattern to the
algolia-crawlerskill —helpers.markdown()+helpers.splitTextIntoRecords()— as the recommended default for docs/prose content.Why
Feedback from the crawler/actions team: convert content to Markdown before indexing. Markdown preserves headings, lists, code, tables, and links that a
.text()extractor flattens — and it's Algolia's own recommended pattern for AskAI/RAG.Changes
record-extractor.md— leads with "Markdown for RAG — the default for docs and prose" (helpers.markdown(selector)→helpers.splitTextIntoRecords({ text, baseRecord, maxRecordBytes, orderingAttributeName }), chunk lives intext, objectIDs auto-suffixed#0/#1). Reframes the hand-rolled extractor for structured data (tables, catalogs).rag-index-settings.md— note to maketextthe primarysearchableAttributewith this pattern.SKILL.md— step 3 points to Markdown as the default for prose.Validated live
Dogfooded on the Algolia Agent Studio docs:
helpers.markdown+splitTextIntoRecordsproduced clean chunked Markdown records (headings/lists/links preserved). Reinforced the skill's own "tune the selector withcrawler test" lesson — the guide's genericmain > *:not(nav)…selector captured only the "On this page" TOC on this site; the real body was undermain [class*=content].Checklist
python3 scripts/validate_skills.py .passes (0 errors)evals/evals.jsonpresent🤖 Generated with Claude Code