Spaces:
Sleeping
Sleeping
title: chat-with-avd-doc | |
app_file: app.py | |
sdk: gradio | |
sdk_version: 5.30.0 | |
# Network Fabric Documentation Chat Assistant | |
 | |
 | |
 | |
 | |
Queries network documentation with natural languague. | |
Recommend interface ports to users based on network fabric documentation. | |
## π Key Features | |
- **Natural Language Queries**: Ask questions about your network in plain English | |
- **Semantic Search**: Uses embeddings to find relevant information beyond simple keyword matching | |
- **Device-Aware Context**: Distinguishes between global and device-specific information | |
- **Interactive UI**: User-friendly Gradio web interface | |
- **Vector Database**: Persistent storage of document embeddings using ChromaDB | |
- **LLM Integration**: Powered by Google's Gemini Flash model | |
- **Customizable Prompts**: Configure system and user prompts through YAML | |
## π Requirements | |
- Python 3.8+ | |
- Dependencies listed in `requirements.txt` | |
## π Working with the Vector Database | |
The application uses FAISS to store document embeddings. The database is created in the `faiss_index` directory. | |
- Documents are organized by "fabric" collection | |
- Metadata includes source information that can identify device-specific documentation | |
- The system distinguishes between global network information and device-specific details | |
## π Usage | |
1. **Start the application**: | |
```bash | |
uv run app.py | |
``` | |
2. **Access the UI**: | |
Open your browser to http://127.0.0.1:7860 | |
3. **Query your network documentation**: | |
- Ask natural language questions about your network | |
- Example: "What is the loopback Pool address used by the fabric?" | |
- Example: "How many IP addresses are in use in the management network?" | |
- Example: "I need unused ports to connect 6 servers. provide me a pair of connections per server." | |
- Example: "What is the name server in this network? -> 8.8.8.8" | |
## π Project Structure | |
``` | |
chat-with-avd-doc/ | |
βββ app.py # Main application with Retriever Tool and Gradio UI | |
βββ prompts.yaml # Configuration for AI prompts and behavior | |
βββ requirements.txt # Python dependencies | |
βββ faiss_index/ # FAISS database files | |
βββ faiss.index # FAISS index file | |
``` | |
## π License | |
MIT License | |
## π€ Contributing | |
Contributions are welcome! Please feel free to submit a Pull Request. | |
1. Fork the repository | |
2. Create your feature branch (`git checkout -b feature/amazing-feature`) | |
3. Commit your changes (`git commit -m 'Add some amazing feature'`) | |
4. Push to the branch (`git push origin feature/amazing-feature`) | |
5. Open a Pull Request | |