Meulex is a Slack question-answering service in Python that answers from your own documents using retrieval-augmented generation.
- Retrieval: dense search over Qdrant (Jina embeddings), BM25 sparse search (optional Pyserini variant), fusion with reciprocal rank fusion, optional reranking, MMR selection and context compression.
- Orchestration: a LangGraph pipeline (preprocess, query expansion, retrieve, compress, prompt, generate) in
meulex/orchestrator/langgraph_rag.py. - LLM: OpenAI-compatible provider with a fallback cascade and circuit breakers; prompts are in
meulex/llm/prompts/. - Slack:
POST /slack/eventsverifies the request signature, handles app mentions and direct messages, acknowledges quickly and posts the reply asynchronously. Seedocs/SETUP_SLACK.md. - API: FastAPI app with
/chat,/embedand/health, rate limiting, security headers and Prometheus/OpenTelemetry metrics. - Storage: Qdrant for vectors, Redis for caching. Ingestion helpers are in
meulex/core/ingestion/and a Prefect flow inmeulex/flows/ingestion.py. - CLI:
meulex/cli/main.pywithapi,ingest-file,ingest-directory,info,test-connectionandevalcommands.
Requires Python 3.12 and Docker.
cp .env.example .env # set the OpenAI, Jina and Slack values
docker compose up -d # API, Qdrant, Redis (add --profile monitoring for Prometheus and Grafana)
# or run the API locally:
pip install -r requirements.txt
uvicorn meulex.api.app:app --host 0.0.0.0 --port 8000The local run without Docker also needs Qdrant and Redis running; start only those with docker compose up -d qdrant redis.
Ingest documents with the CLI (sample files are in test_data/), then connect Slack as described in docs/SETUP_SLACK.md. Common problems are covered in docs/TROUBLESHOOTING.md.
Archived reference implementation. Not maintained.
Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0). See LICENSE.