AI Notebook Lab
AI Notebook Lab
AI-powered notebook environment built on JupyterLab for data science, analysis, and development.
Overview
AI Notebook Lab is built on JupyterLab, the industry-standard notebook environment, enhanced with deeply integrated AI capabilities. Query databases with natural language, generate visualizations, learn from your codebase, and leverage multiple AI providers—all within your notebooks.
Key Capabilities
Database Magic (%db / %%db)
Interact with your databases using natural language or direct SQL:
- Natural Language SQL - Ask questions in plain English, get SQL + results
- Multi-Database Support - PostgreSQL, MySQL, SQLite, BigQuery, Snowflake, Redshift, and more
- One-shot schema discovery - Auto-inspect datasource schemas
- DataFrame results - Results returned as pandas DataFrames
AI Magic (%ai / %%ai)
Direct access to AI models for code generation, explanations, and more:
- Multiple Providers - OpenAI, Anthropic, Google, Mistral, Ollama, AWS Bedrock
- Output Formats - Code, markdown, HTML, math, JSON, text
- Variable Interpolation - Reference notebook variables in prompts
- Conversation Memory - Multi-turn context across cells
Chat Interface
Sidebar chat with slash commands:
/learn- Index local files for Q&A/generate- Create entire notebooks from descriptions/fix- Diagnose and fix code errors/ask- Query learned content/clear- Reset conversation
Quick Start
Natural Language SQL
%%db ask sales_db
What were the top 10 products by revenue last quarter?Output includes:
- Generated SQL query
- Executed results as a pandas DataFrame
_dfand_sqlvariables available for further processing
Connect to a Database
%db list # See available datasources
%db connect sales_db # Connect (creates SQLAlchemy engine)
%db schema sales_db # Inspect tables and columnsCode Generation
%%ai anthropic:claude-3-5-sonnet-20241022 -f code
Write a function to calculate compound interest with
principal, rate, time, and compounding frequency parametersLearn Your Codebase
# In chat sidebar
/learn ./src
# Then ask questions
/ask How does the authentication system work?Example Notebooks
Explore the Calliope Demo Repository with 28 ready-to-run notebooks:
By Database
| Database | Type | Use Case |
|---|---|---|
| Sakila | MySQL | DVD rental analytics, inventory |
| Chinook | PostgreSQL | Music store, e-commerce |
| Northwind | PostgreSQL | Business operations, supply chain |
| Employees | MySQL | HR analytics, compensation |
| World | MySQL | Geographic, demographics |
| AirportDB | MySQL | Transportation, logistics |
By Topic
Calliope-GettingStarted.ipynb- First queries, model selectionCalliope-AdvancedQueries.ipynb- Joins, window functions, analyticsCalliope-Visualizations.ipynb- Charts, plots, dashboardsCalliope-DirectSQL.ipynb- SQL generation and debuggingCalliope-JupyterAI-Integration.ipynb- Multi-model workflows
When to Use Lab
| Task | Best Tool |
|---|---|
| Data analysis and exploration | Lab |
| Natural language SQL queries | Lab |
| Interactive notebooks | Lab |
| Visualizations and charts | Lab |
| Multi-file code development | IDE |
| Web automation | Agentic Browser |