Search toys using natural language powered by embeddings.
This skill enables semantic search across the Tailspin Toys product catalog. Users can search using natural language queries like "electronic toys for kids" and get relevant results even if exact keywords don't match product names.
embeddings.json# Search for toys
python .github/skills/semantic-search/agent.py "electronic toys from the 90s"
# Regenerate all toy embeddings
python .github/skills/semantic-search/agent.py --reindex
POST /api/search
Content-Type: application/json
{"query": "classic gully games for kids"}
{
"query": "classic gully games for kids",
"results": [
{
"name": "Water Ring Toss",
"category": "Classic",
"price": 799,
"score": 0.92
},
{
"name": "Simon",
"category": "Electronic",
"price": 2499,
"score": 0.85
}
]
}
| Query | Expected Top Results |
|---|---|
| "electronic toys" | Simon, Furby, Speak & Spell |
| "classic toys for young kids" | Water Ring Toss, Cabbage Patch Kid |
| "activity toys" | Mr Frosty |
| "toys that talk" | Furby, Speak & Spell |
| "nostalgic 90s toys" | Furby, Simon, Speak & Spell |
| File | Purpose |
|---|---|
agent.py | Main skill logic — embedding generation and search |
embeddings.json | Pre-computed toy embeddings |
SKILL.md | This documentation |
Uses Azure OpenAI with:
AZURE_OPENAI_ENDPOINT environment variabletext-embedding-ada-002Run this when the toy catalog changes (e.g., after re-seeding the database):
python .github/skills/semantic-search/agent.py --reindex
This will:
embeddings.json