Build Your First NLWeb Application
Learn how to set up NLWeb locally and deploy it to Azure. From "Hello World" to production-ready applications in minutes.
Get NLWeb running on your local machine in under 10 minutes. Perfect for development and testing.
Deploy NLWeb to Azure with container instances and managed services for production workloads.
NLWeb Hello World
Set up your first NLWeb instance locally and run your first natural language query
Required Software
- • Python 3.8 or higher
- • Git
- • OpenAI API key (or other LLM provider)
- • Vector database (Qdrant recommended)
Optional Tools
- • Docker (for containerized setup)
- • VS Code with Python extension
- • Azure CLI (for cloud deployment)
Get the NLWeb source code from Microsoft's official repository:
Create a Python virtual environment and install dependencies:
Set up your API keys and configuration:
Required Environment Variables
OPENAI_API_KEY - Your OpenAI API keyQDRANT_URL - Qdrant instance URL (or use local)QDRANT_API_KEY - Qdrant API key (if using cloud)Load some sample content to query against:
Launch the NLWeb server and access the web interface:
🎉 Success!
Visit http://localhost:8000 to access the NLWeb interface. Try asking: "Show me sci-fi movies from the 1980s"
Try these example queries to test your setup:
Sample Queries
API Testing
Deploy NLWeb to Azure
Scale your NLWeb application with Azure's managed services and container infrastructure
Container Instances
Deploy NLWeb in Azure Container Instances for serverless scaling
Azure AI Search
Use Azure AI Search as your vector database backend
Azure OpenAI
Integrate with Azure OpenAI for enterprise-grade LLM capabilities
Create the required Azure services:
Set up Azure AI Search as your vector database:
Create a container image and push to Azure Container Registry:
Deploy NLWeb using Azure Container Instances:
Set up monitoring, scaling, and security for production:
Security
- • Use Azure Key Vault for secrets
- • Enable managed identity
- • Configure HTTPS with custom domain
- • Set up network security groups
Monitoring
- • Enable Application Insights
- • Set up log analytics
- • Configure alerts and dashboards
- • Monitor API usage and costs
What's Next?
Explore Documentation
Learn about advanced configuration, custom prompts, and integrations.
Try Examples
Explore real-world examples and use cases for different industries.
Join Community
Connect with other developers and contribute to the project.