Overview
FastSkill’s embedding-based search uses OpenAI’s embedding models to understand the semantic meaning of queries, enabling intelligent skill discovery beyond simple keyword matching.Embedding search requires configuration and an OpenAI API key. It provides superior relevance for natural language queries.
How It Works
1. Text Vectorization
Both your search query and all indexed skills are converted into mathematical vectors using OpenAI’s embedding models. These vectors capture semantic meaning, not just keywords.2. Similarity Calculation
The system calculates cosine similarity between your query vector and all skill vectors to find the most semantically relevant matches.3. Relevance Ranking
Skills are ranked by their semantic similarity to your query, often finding skills that don’t contain exact keywords but are conceptually related.Configuration
1. Create Configuration File
Create.fastskill.yaml in your project root:
2. Set API Key
3. Index Skills
- Scans all
SKILL.mdfiles in the specified directory - Extracts frontmatter and content
- Generates embeddings for each skill
- Stores them in a local SQLite database
Usage
Basic Semantic Search
Output Formats
Table Format (Default)
JSON Format
XML Format
Controlling Search Behavior
Example Results
Semantic Search Results
For query: “I need to run a meeting and need to summarize the main points visually” Embedding Search Finds:- PowerPoint presentation skills
- Meeting summarization tools
- Chart and graph creation utilities
- Visual data representation tools
- Skills that use synonyms or related terms
- Tools that focus on the outcome rather than the exact process
Performance Considerations
Indexing
- First Time: May take several minutes for large skill sets
- Updates: Only changed skills are re-indexed
- Storage: Embeddings are stored locally in SQLite database
Search Speed
- Very Fast: Vector similarity search is optimized
- Local: No external API calls during search
- Scalable: Handles thousands of skills efficiently
Troubleshooting
Common Issues
”Embedding not configured”
Solution: Create.fastskill.yaml with embedding configuration.
”OPENAI_API_KEY environment variable not set”
Solution: Set your OpenAI API key as an environment variable.”Vector index service not available”
Solution: Runfastskill reindex first to build the index.
API Rate Limits
Solution: The system handles rate limits gracefully. Consider using a paid OpenAI plan for large indexing operations.Debugging
Enable verbose logging to troubleshoot issues:Integration with AI Agents
Cursor Integration
FastSkill automatically generates markdown files for Cursor integration:Custom Agent Integration
Best Practices
Query Formulation
- Use natural language queries
- Describe the desired outcome, not specific tools
- Include context about your use case
Index Maintenance
- Run
fastskill reindexafter adding new skills - Re-index periodically to catch updates
- Use
--forceflag to rebuild entire index if needed
Configuration
- Use
text-embedding-3-smallfor most use cases (cost-effective) - Upgrade to
text-embedding-3-largefor higher accuracy if needed - Keep API keys secure and rotate regularly
Cost Considerations
OpenAI API Costs
- text-embedding-3-small: ~$0.02 per 1M tokens
- Indexing: Costs scale with total content size
- Search: Free after indexing (local vector search)
Optimization Tips
- Index only relevant skills
- Use smaller embedding models for cost savings
- Cache embeddings to avoid re-indexing