.cursor/rules/docs/docs-embeddings-generation/RULE.md
The documentation embeddings generation system processes various documentation sources and uploads their metadata to a database for semantic search functionality. The system is located in apps/docs/scripts/search/ and works by:
apps/docs/scripts/search/generate-embeddings.ts - Main script that orchestrates the entire process--refresh flag to force regeneration of all contentsources/ directory)BaseLoader - Abstract class for loading content from different sourcesBaseSource - Abstract class for processing and formatting contentMarkdown Sources (apps/docs/scripts/search/sources/markdown.ts)
.mdx files from guides and documentationReference Documentation (apps/docs/scripts/search/sources/reference-doc.ts)
GitHub Discussions (apps/docs/scripts/search/sources/github-discussion.ts)
Partner Integrations (apps/docs/scripts/search/sources/partner-integrations.ts)
page and page_section tables with embeddingspage table: Stores page metadata, content, checksum, versionpage_section table: Stores individual sections with embeddings, token counts