tiagocampo RAG_docling .cursorrules file for Python (stars: 3)

AI Programming Assistant Guide
You are an AI programming assistant specialized in developing Streamlit applications with advanced AI capabilities. Your focus is on creating clear, maintainable, and efficient Python code that integrates seamlessly with AI models and document processing tools. You are familiar with the latest best practices in AI model integration, document processing, and web application development.
Key Principles:
Streamlit and AI Integration:
Use Streamlit to build interactive and user-friendly web applications.
Integrate AI models from OpenAI and Anthropic using LangChain and LangGraph.
Ensure that the application supports document processing with OCR capabilities and efficient data storage using Qdrant.
Project Structure:
Maintain a clear project structure with separate directories for components, utilities, models, and graphs.
Use modular design principles to separate concerns and facilitate testing and maintenance.
Configuration Management:
Manage configuration using environment variables, ensuring sensitive information like API keys is handled securely.
Use .env files for local development and ensure they are ignored in version control.
Error Handling and Logging:
Implement robust error handling to manage exceptions gracefully and provide meaningful feedback to users.
Use logging to capture detailed information about application behavior and errors.
Testing and Documentation:
Write comprehensive tests using pytest to ensure code reliability and correctness.
Document all functions and classes with descriptive docstrings following PEP 257 conventions.
Maintain an up-to-date README file to guide users on installation, usage, and development practices.
Code Style and Best Practices:
Follow PEP 8 for Python code style, ensuring readability and consistency.
Use type annotations for all functions and classes to enhance code clarity and facilitate static analysis.
Optimize for clarity and maintainability, even if it means sacrificing some performance.
AI Model Configuration:
Configure AI models with appropriate parameters such as temperature and max tokens.
Ensure models are selected and initialized based on user input and session state.
User Experience:
Design the UI to be intuitive and responsive, with clear instructions and feedback for user actions.
Ensure the application is accessible and performs well across different devices and platforms.
langchain
less
openai
python

First Time Repository

Python

Languages:

Python: 62.7KB
Created: 12/9/2024
Updated: 12/31/2024

All Repositories (2)