An AI-powered semantic similarity search application that provides burrito restaurant recommendations using SQL Server 2025 vector search capabilities.
The Burrito Bot demonstrates the practical application of vector embeddings and semantic search in SQL Server 2025. By converting restaurant reviews and metadata into vector embeddings, the system can intelligently match user queries to the most relevant burrito restaurants based on semantic similarity rather than keyword matching.
SQL Server scripts that comprise the complete data pipeline:
1. Create Database.sql- Database initialisation and schema setup2. Create Data Tables.sql- Main tables for storing restaurant and review data3a. Pull Restaurant Metadata.sql- Scripts for retrieving restaurant metadata3b. Pull Restaurant Reviews.sql- Scripts for retrieving restaurant reviews4. Create Raw Data Tables.sql- Staging tables for raw data5. Import Raw Data.sql- Load raw data from external sources6. Import Data to Main Tables.sql- Transform and load data into main tables7. Create External Model.sql- Configure external AI model for embeddings8. Generate Embeddings.sql- Generate vector embeddings for all reviews9. VECTOR DISTANCE.sql- Calculate vector distances between embeddings10. VECTOR SEARCH.sql- Perform semantic similarity searches11. Comparing Search Results.sql- Compare different search approaches12. VECTOR SEARCH Stored Procedure.sql- Stored procedure wrapper for search functionality
Scripts and data files for data acquisition and visualization:
- PowerShell Scripts - Automated data collection from Google Maps API
pull place ids from google maps.ps1- Extract restaurant identifierspull review data from google maps.ps1- Collect restaurant reviewspull data from google maps - old api.ps1- Legacy API integration
- Raw Data/ - Intermediate data storage (place IDs, reviews, archive)
- Visualise Data/ - Embedding visualization datasets
Embeddings One/- Restaurant metadata embedding setEmbeddings Two/- Restaurant review embedding set
- Collection - PowerShell scripts fetch restaurant metadata and reviews from Google Maps
- Staging - Raw data is imported into staging tables
- Processing - Data is transformed and loaded into main tables
- Embeddings - SQL Server generates vector embeddings using AI models
- Search - Semantic similarity queries find the most relevant restaurants
The system uses vector embeddings to understand the semantic meaning of reviews and queries. When a user searches for "amazing burritos," the system finds restaurants with similar review content rather than exact keyword matches.
- Vector Search and Vector Indexes in SQL Server
- Vector and Embeddings FAQ
- AI_GENERATE_EMBEDDINGS Function
- Massive Text Embedding Benchmark
- Efficiently and Elegantly Modeling Embeddings in Azure SQL and SQL Server
- Vector Similarity Explained
- Cosine Similarity and Cosine Distance
- Blog Post: The Burrito Bot - AI-Powered Search in SQL Server 2025
- Slides: Interactive Presentation
- Semantic Search - Find restaurants based on review content similarity, not just keywords
- Vector Embeddings - AI-generated embeddings for intelligent matching
- Scalable Architecture - Leverages SQL Server's native vector capabilities
- Real-World Data - Uses actual Google Maps restaurant and review data
- Comparison Tools - Analyze different search methodologies
This repository welcomes contributions! If you have:
- Improvements to the pipeline or queries
- Additional data sources or visualization approaches
- Bug fixes or optimizations
- Documentation enhancements
Please submit a pull request with your changes.
This project is provided as-is for educational and reference purposes.
Andrew Pruski (@dbafromthecold)
- Blog: dbafromthecold.com
- Email: dbafromthecold@gmail.com
- GitHub: github.com/dbafromthecold
Built with ❤️ for the SQL Server and AI community