Skip to content

RAG & retrieval 03 Serve

RAG Pipelines Hosting

Build powerful RAG applications with your own data.

  • GLM
  • DeepSeek
  • Qwen
  • Kimi
  • Mistral
  • Llama
  • gpt-oss
  • Gemma
  • Loes
  • Nemotron
  • Claude Code
  • Codex
  • OpenCode
  • Cursor
  • Cline
  • Loes
  • OpenAI SDK
  • Anthropic SDK

What it does RAG & retrieval

Why RAG pipelines in the EU

Most RAG projects stall on plumbing: chunking, embeddings, a vector store, retrieval logic, prompt assembly. HostYourAI ships that plumbing as a platform feature. Upload documents to a knowledge base, link it to the shared Router or a dedicated instance, and relevant context is injected into your chat completions automatically. Your code keeps making ordinary OpenAI-compatible calls.

The documents in a RAG pipeline are usually the exact material you would never post publicly: manuals, contracts, policies, internal knowledge. With HostYourAI both the documents and the inference stay in European datacenters, covered by a Data Processing Agreement, which makes RAG viable for the sensitive content it is best at. The full walkthrough lives in the guide Build RAG on EU GPUs.

Read more

01

Your documents follow your prompts

Retrieval means document excerpts travel inside every enriched prompt. If inference happens outside Europe, your knowledge base effectively leaks across the border one chunk at a time. Keeping storage and inference together in multiple European regions, encrypted with AES-256 at rest, closes that gap. HostYourAI does not train on customer data.

02

Sovereignty over the whole pipeline

A RAG stack has many moving parts, and each external service is another jurisdiction to assess. Running retrieval and generation on one European platform, with a public subprocessor list, gives organizations in government and healthcare a pipeline they can actually defend in a review.

03

Retrieval is latency-sensitive

Every RAG request does extra work before the first token: search, ranking, prompt assembly. When retrieval and inference sit in the same European infrastructure, that overhead stays small, and warm Router models mean generation starts without a model load.

02 RAG & retrieval

How the injection works end to end

You create a knowledge base, add documents, and link it to the Router or to one of your dedicated GPU instances. On every chat completion, the platform retrieves the most relevant chunks for the user's question and injects them as context before the model generates. Non-streaming responses include a sources array with the document name and an excerpt for each chunk used, so you can show citations in your UI. Prefer explicit control? Pass knowledge_base_id in the request body instead of linking. And if retrieval ever fails, the request degrades gracefully: the chat continues without the extra context rather than erroring out.

Pipeline stageWhat happens
IngestDocuments are uploaded, chunked and indexed in the knowledge base
LinkKnowledge base is attached to the Router or an instance, or passed per request
RetrieveThe user's question is matched against chunks by relevance
InjectTop chunks are added to the prompt before generation
CiteNon-streaming responses return sources with document name and excerpt
DegradeIf retrieval fails, the completion proceeds without context
03 RAG & retrieval

How to start

If a knowledge base is linked, no code changes are needed at all. To target one explicitly, pass knowledge_base_id via extra_body in the Python SDK:

python
from openai import OpenAI

client = OpenAI(
    base_url="https://hostyourai.com/api/v1",
    api_key="hyai-...",
)

response = client.chat.completions.create(
    model="llama-3.2-1b",
    messages=[{"role": "user", "content": "What does our warranty cover for water damage?"}],
    extra_body={"knowledge_base_id": 42},
)

print(response.choices[0].message.content)
for source in response.model_extra.get("sources", []):
    print(source["document"], "-", source["excerpt"][:80])
Questions

Questions about RAG pipelines

Do I need my own vector database?

No. The knowledge base handles chunking, indexing and retrieval on the platform. If you prefer full control, you can still bring your own retrieval stack and send assembled prompts.

How do I connect a knowledge base to my requests?

Two ways: link it to the Router or to an instance so every completion is enriched automatically, or pass knowledge_base_id explicitly in the request body for per-call control.

Can I show users where an answer came from?

Yes. Non-streaming responses include a sources array with the document name and an excerpt per retrieved chunk. Streaming responses are enriched with context but cannot carry sources metadata in the SSE chunks.

What happens if retrieval fails?

The completion continues without injected context instead of returning an error. Your chat stays up even if the knowledge base is briefly unavailable.

Which models work with the knowledge base link?

Any model you can call, on the EU Inference Router or a dedicated instance. Pick one from the model catalog; larger models tend to synthesize retrieved context more faithfully.

What does RAG cost on top of inference?

Retrieved context adds input tokens to each request, billed pay-as-you-go from your prepaid credit balance. See the pricing page.

Everything you need for AI

From model hosting to a customer-facing API, it is built for developers and businesses who want their AI running on infrastructure they actually control, inside the EU.

EU-hosted

100%

Your data and your models stay on European GPUs. GDPR-friendly by design.

Verified models, ready to serve

650+

Llama, Qwen, DeepSeek, Mistral, FLUX and plenty more. Pick one and it is warm in minutes, with no DevOps on your end.

OpenAI & Anthropic compatible

2 SDK

Point your existing client at the Router and keep your tools. No rewrite, no lock-in.

From zero to a warm endpoint in minutes

No infra to manage. Pick a model, get an OpenAI-compatible URL, ship.

01

Pick a model

Choose from the Model Garden or paste any HuggingFace ID. Set the VRAM and pick an EU GPU.

02

Get your endpoint

We deploy vLLM, run readiness probes, and hand you a warm OpenAI- and Anthropic-compatible URL plus an API key.

03

Route and ship

Point your client at the Router. It auto-routes to a warm instance and logs every request.

Built for teams that can't send data away

If a US cloud is off the table, HostYourAI gives you the same developer experience on European infrastructure.

01

Public sector & government

Citizen data that legally has to stay in the EU, with full auditability.

02

Regulated enterprise

Finance, healthcare and legal teams under GDPR, DORA and the AI Act.

03

EU SaaS & scale-ups

Ship AI features your customers trust, without a US sub-processor.

04

Agencies & integrators

Deliver private AI for clients on infrastructure you can stand behind.

Private by Default

HostYourAI keeps your models, prompts and data on European GPUs. It is built for teams that care about compliance, reliability and real control.

  • EU-hosted
  • GDPR-friendly
  • OpenAI-compatible
  • vLLM-powered
  • No lock-in

Full data sovereignty

EU

GPUs and data stay inside Europe, and so do your prompts.

Models you can audit

Open

Run open-weight models and see exactly what runs.

No monthly fee

€0

Prepaid credit per token or per minute, so you pay only for what you run.

Your keys, your models

Yours

Your keys, your models and your data. Move whenever you want.

The platform

One platform, four layers

Start with one layer and add the others when the work asks for it. They share one key, one balance and one Activity view.

Code

Your coding agent on open models in Europe, set up with one command.

Open

Control

Keys, budgets and guardrails per team, and personal data stopped before any model sees it.

Open

Serve

Shared per token, or running for you alone, from European data centres.

Open

EU compute

Private GPUs in Europe, H100 to B300, sized for response time, generation speed and concurrent users.

Open

Related pages

Explore more about EU-hosted AI on HostYourAI.

OpenAI-compatible API

A drop-in OpenAI-compatible API on European GPUs. Change only the base URL and run open models, GDPR-friendly, without rewriting your code.

Read more

Model Garden

Browse a curated catalog of serveable open chat, image and embedding models with live warm/EU state. Deploy in one click on European GPUs.

Read more

Chatbot Hosting Platform

Host AI chatbots on European infrastructure. Customer service, internal assistants, and more with GDPR compliance.

Read more

Europe's AI infrastructure.
Come build with us.

Start with one key today. Add dedicated GPUs when your workload needs them.

  • Jantine
  • Hans
  • Sander
  • Jos
  • Daan
  • Kyra
  • Margriet
  • Stan
The team behind HostYourAI