
Dokumentor ist ein System mit Rag (Abruf Augmented Generation), das als technischer Dokumentationsassistent fungiert. Mithilfe von Lag-Architektur kombiniert das System die Kraft von GPT-3.5 von OpenAI mit einer lokalen Wissensbasis, um präzise und kontextualisierte Antworten auf technische Dokumente auf Spanisch zu liefern.
Python 3.10+ : Projektbasissprache
Langchain : Hauptgerüst für den Bau des Lappensystems
OpenAI -API :
RAG (Abruf Augmented Generation) :
Der Dokument verwendet Streamlit als Framework für die Benutzeroberfläche, sofern:
Interaktiver Chat :
Dokumentverwaltung :
Bedienfeld :
documentmentor/
├── data/ # Datos y almacenamiento
│ ├── processed/ # Documentos procesados
│ ├── vector_store/ # Almacenamiento vectorial
│ │ ├── document_map.json # Mapeo de documentos
│ │ └── faiss.index # Índice FAISS
│ └── documentmentor.db # Base de datos SQLite
│
├── src/ # Código fuente
│ ├── core/ # Lógica principal
│ │ ├── __init__.py
│ │ ├── document_processor.py # Procesamiento de PDFs
│ │ ├── memory_manager.py # Gestión de memoria
│ │ └── qa_engine.py # Motor de Q&A
│ │
│ ├── data/ # Capa de datos
│ │ ├── __init__.py
│ │ ├── database.py # Operaciones SQLite
│ │ └── vector_store.py # Gestión vectorial
│ │
│ └── ui/ # Interfaz de usuario
│ └── app.py # Aplicación Streamlit
│
├── .env # Variables de entorno
├── .env.example # Ejemplo de configuración
├── .gitignore
├── main.py # Punto de entrada
├── README.md
└── requirements.txt # Dependencias
PDF -Last :
Indexierung :
Benutzerfragen :
Semantische Suche :
Generation von Antworten :
Vorbereitung :
Konsultationen :
Nachverfolgen :
# Core LangChain dependencies
langchain == 0.3 . 12
langchain - core == 0.3 . 25
langchain - community == 0.3 . 12
langchain - openai == 0.2 . 12
openai == 1.57 . 4
# Document Processing
pypdf == 5.1 . 0
python - dotenv == 1.0 . 1
# Vector Store & Embeddings
sentence - transformers == 3.3 . 1
faiss - cpu == 1.9 . 0. post1
torch == 2.5 . 1
torchvision == 0.20 . 1
torchaudio == 2.5 . 1
# Database
SQLAlchemy == 2.0 . 36
# UI Framework
streamlit == 1.41 . 1
# Utils
numpy == 2.2 . 0
pandas == 2.2 . 3
pydantic == 2.10 . 3 git clone https://github.com/Jaolmos/documentmentor-rag.gitpython -m venv venv # Windows
venv S cripts a ctivate
# Linux/Mac
source venv/bin/activatepip install -r requirements.txt # Copiar el archivo de ejemplo
cp .env.example .env
# Editar el archivo .env usando .env.example como referencia
# y añadir tu API key de OpenAI
OPENAI_API_KEY=tu_api_keypython main.py Das main.py -Skript führt die folgenden Aufgaben aus:
.envOPENAI_API_KEYdata/processed/ für verarbeitete Dokumentedata/vector_store/ für Vektorindizes