chat-with-avd-doc / README.md
rogerscuall's picture
Upload folder using huggingface_hub
335d527 verified
---
title: chat-with-avd-doc
app_file: app.py
sdk: gradio
sdk_version: 5.30.0
---
# Network Fabric Documentation Chat Assistant
![Network Documentation](https://img.shields.io/badge/Network-Documentation-blue)
![Python](https://img.shields.io/badge/Python-3.8+-yellow)
![ChromaDB](https://img.shields.io/badge/ChromaDB-Backend-green)
![Gemini](https://img.shields.io/badge/Gemini-Flash-purple)
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