All configuration for the Mesa de Ayuda IA backend is loaded from aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/geremyjampiersalasgarcia-eng/Caso_Practico_Semillero_IA/llms.txt
Use this file to discover all available pages before exploring further.
.env file located in the backend/ directory. To get started, copy the provided template and fill in your values:
Google Gemini API
Your Google Gemini API key. Generate one for free at https://aistudio.google.com/apikey. This key is used by all agents (
ChatGoogleGenerativeAI) and by the embedding pipeline (GoogleGenerativeAIEmbeddings).LLM Configuration
The Gemini model used by all RAG and action agents. The default
gemini-flash-lite-latest offers a good balance of speed and quality for sales help-desk workloads. You can substitute any model available in your Gemini quota (e.g. gemini-1.5-flash, gemini-1.5-pro).The Gemini embedding model used during both document ingestion and retrieval. This value must stay consistent between ingestion runs — changing it without re-ingesting will cause vector-space mismatches.
Sampling temperature applied to agent responses. Lower values produce more deterministic, factual answers suitable for a sales assistant. Note that the classifier node always uses
0.0 regardless of this setting, to ensure consistent intent routing.ChromaDB
Path where ChromaDB stores its persistent vector collections, relative to the
backend/ directory. The three collections (col_catalogo, col_politicas, col_proceso_ventas) will all be written here after running the ingestion script.RAG Configuration
Maximum size of each text chunk in characters produced by
RecursiveCharacterTextSplitter during ingestion. Smaller values yield more granular retrieval; larger values preserve more context per chunk.Number of characters that overlap between consecutive chunks. Overlap prevents context loss at chunk boundaries — particularly important for numbered lists and price tables in the catalog document.
Number of ChromaDB chunks retrieved per query during inference. Each RAG agent fetches this many chunks from its dedicated collection before generating an answer.
API Configuration
Network interface the FastAPI/Uvicorn server binds to. Use
0.0.0.0 to accept connections from any interface (required when running inside Docker or behind a reverse proxy).TCP port the API server listens on. The frontend expects this to be
8000 by default (NEXT_PUBLIC_API_BASE_URL=http://localhost:8000/api/v1).Enables FastAPI debug mode, which activates auto-reload and more verbose error pages. Set to
false for production deployments.CORS
A JSON-encoded list of allowed origins for Cross-Origin Resource Sharing. Add any additional frontend URLs here when deploying to staging or production. Example for a remote deployment:
Observability
Minimum log level emitted by
structlog. Accepted values: DEBUG, INFO, WARNING, ERROR, CRITICAL. Use DEBUG during development to see detailed agent-step traces.Project name shown in the Arize Phoenix observability UI. All LLM traces and spans generated by the agent graph are grouped under this name, making it easy to filter by project in the Phoenix dashboard at
http://localhost:6006.Database
Full PostgreSQL connection string used to persist conversation history and CRM audit records. The port
5433 (not 5432) is because the Docker Compose setup maps the container’s 5432 to 5433 on the host to avoid conflicts with any locally installed PostgreSQL instance.If the PostgreSQL service is unreachable at startup, the backend automatically falls back to a local SQLite database so development can continue without Docker.Complete sample .env file
The
backend/.env file is listed in .gitignore and is never committed to version control. Only the .env.example template (with empty or default values) is tracked by Git. Always manage secrets outside the repository — for example through a secrets manager or CI/CD environment injection.