Retrieval-augmented generation over proprietary documents is one of the highest-value LLM applications, and one of the hardest to justify sending to a third-party API. Contracts, research data, operational reports: the sensitivity adds up fast.
I only use ethical AI: models from trusted companies, purpose-built models I train myself, or open-source models self-hosted on private infrastructure. When the documents cannot leave the building, self-hosting is the route that fits.
The stack I reach for: embeddings with open models, pgvector or Chroma for storage, Ollama or vLLM for inference on local or VPC hardware, and LangChain or custom orchestration for the retrieval loop. It is not as turnkey as an API call, but cost and control improve dramatically at scale.
Fine-tuning is rarely step one. Good chunking, metadata filtering, and hybrid search (semantic plus keyword) solve most grounding problems before you need a custom model.
Treat the LLM as one component in a verified pipeline: cite sources, log queries, measure retrieval precision, and add human review for high-stakes outputs. AI is a layer, not a substitute for data quality.