XWiki AI Setup: LLM Application with a Local Model and RAG

Editorial note: The information in this article was compiled to the best of our knowledge at the time of publication. Technical details, prices, versions, licensing terms, and external content may change. Please verify the information provided independently, particularly before making business-critical or security-related decisions. This article does not replace individual professional, legal, or tax advice.

XWiki with AI search across your own content? WZ-IT operates XWiki and sets up the LLM Application with a model on your own hardware or a managed GPU server, see XWiki managed hosting and AI solutions. Schedule a meeting
XWiki ships without AI. Anyone who wants a chat with source references, writing assistance in the editor or semantic search across their own pages installs the LLM Application from the xwiki-contrib project together with the Index for the LLM Application. Combined, they form a RAG system inside XWiki: pages are split into chunks, stored as vectors in Solr and passed to the language model as context with every question.
Step-by-step guides are scarce, and the official extension page lists partly outdated requirements. This article describes the state of version 0.10, released on 18 September 2026: requirements, installation, connecting Ollama or vLLM, indexing, access rights and the limits of the extension. All configuration steps follow the documentation on extensions.xwiki.org and the source code on GitHub. As of September 2026.
Table of contents
- What the LLM Application is
- Versions and requirements
- Architecture: where model, index and rights live
- Installation via the Extension Manager
- Connecting a local model: Ollama and vLLM
- Indexing wiki content: collections and RAG
- Access rights: what the chat may see
- MCP server and external integration
- Limits and known issues
- Our approach at WZ-IT
- Further guides
What the LLM Application is
The "LLM" project bundles several extensions that share one version number (LLM project page). Its developers include Ludovic Dubost and Michael Hamann, and parts of the indexing work were funded by NGI Search as part of the WAISE project (WAISE proposal).
| Extension | Purpose | Type | Active installs |
|---|---|---|---|
| LLM Application | chat, writing assistance in the editor, prompt database, server and model configuration | XAR | 213 |
| Index for the LLM Application | collections, chunking, embeddings, search as RAG context | XAR | 176 |
| LLM Internal Inference Server | embeddings on the CPU inside the XWiki process | JAR | 56 |
| Token-based authentication | sign-in of external applications with a signed JWT | XAR | 44 |
| LLM Chat WebJar | embeddable chat widget and JavaScript library | WebJar | 231 |
| MCP Server | wiki content as tools for AI agents | XAR and JAR | not stated |
Install counts according to extensions.xwiki.org, as of September 2026. All extensions are licensed under the GNU Lesser General Public License 2.1 and marked as BETA. The documentation says so plainly: unexpected behaviour can occur.
The features of the LLM Application at a glance:
- Chat with a choice between the approved models, plus temperature and system prompt in the advanced settings.
- Quick tasks from a prompt database, for example summarising or translating. Custom prompts can be created with title, system and user prompt and temperature.
- Insert into the page: answers can be inserted at the cursor position in the editor or copied to the clipboard.
- Context from the index, as soon as the Index for the LLM Application is installed and at least one collection is assigned to a model.
Versions and requirements
Recent releases according to the LLMAI Jira project and the tags in the GitHub repository:
| Version | Released | Key changes |
|---|---|---|
| 0.10 | 18 Sep 2026 | more MCP tools (attachments, objects, schema, history), fix: keyword search without a wiki filter returned chunks from other wikis (LLMAI-164) |
| 0.9 | 7 Jul 2026 | administration UI for the MCP server, fix for inference servers without HTTP/2 upgrade support such as LM Studio (LLMAI-137) |
| 0.8 | 18 Mar 2026 | MCP server, search context via the REST API, platform base XWiki 17.4 |
| 0.7.2 | 1 Aug 2025 | last version based on XWiki 16.2 |
| 0.7 | 26 Nov 2024 | keyword search in addition to vector search |
| 0.5 | 9 Jul 2024 | indexing of existing wiki spaces, embeddings on the CPU inside the XWiki server |
Anyone running 0.8 or 0.9 with several wikis in a farm should upgrade to 0.10 because of LLMAI-164.
| Requirement | Value | Source |
|---|---|---|
| XWiki version for 0.8 to 0.10 | 17.4.0 or later | README, parent POM 17.4.0 |
| XWiki version for 0.3 to 0.7.2 | 16.2.0 or later | extension page |
| Installation | Extension Manager with internet access, offline installation only manually | extension page |
| Chat model | external server with OpenAI-compatible API (/chat/completions) |
extension page |
| Embedding model | external server (/embeddings) or Internal Inference Server |
extension page, source code |
| Internal Inference Server | Linux on x86-64 only, around 500 MB for model and PyTorch | extension page |
The "16.2.0 and above" compatibility note on the LLM Application page is outdated for current versions. The README is authoritative with "Minimal XWiki version supported: XWiki 17.4.0". An installation on XWiki 16.x therefore needs a platform upgrade before AI can be introduced.
Architecture: where model, index and rights live
The LLM Application is a mediation layer. XWiki does not run chat models itself; it forwards requests to an inference server and exposes its own OpenAI-compatible REST API for that purpose (/rest/wikis/<wiki>/aiLLM/v1/chat/completions and /v1/models).
| Component | Where it runs | What to keep in mind |
|---|---|---|
| Chat model | external inference server (Ollama, vLLM, European API) | OpenAI-compatible endpoints only |
| Embedding model | external server or inside the XWiki process | vector length in the index fixed at 1,024 |
| Vector and keyword index | dedicated Solr core aillm in XWiki's Solr |
cosine similarity, vector field with 1,024 dimensions |
| Rights check | after the search, per collection | method public, external or xwiki |
Three details from the version 0.10 source code matter for planning (application-ai-llm on GitHub):
- Fixed vector length. The Solr core creates the vector field with 1,024 dimensions. Embeddings are brought to exactly this length before storage: longer ones are truncated, shorter ones padded with zeros. A model with 1,024 dimensions fits without loss.
- Hybrid search without reranking. Since 0.7, vector search and keyword search run side by side. The results are concatenated and duplicate chunks removed, without a combined ranking and without a reranker. How this differs from Reciprocal Rank Fusion and cross-encoders is explained in the article on hybrid search and reranking.
- Rights after the search. The rights check filters the chunks already retrieved. If many hits are removed, the model receives correspondingly less context.
Installation via the Extension Manager
Installation follows the usual XWiki route (LLM Application, Prerequisites & Installation Instructions):
- Sign in with an account that has administration rights.
- Search for "LLM Application" in the Extension Manager and install it. Dependencies such as the LLM Models API and the Chat WebJar are installed along with it.
- For RAG, also install "Index for the LLM Application".
- Only if embeddings are to be computed inside the XWiki process: install "LLM Internal Inference Server".
- Restart XWiki. Without a restart the model list stays empty; this is the known bug XWIKI-21887, still open in September 2026.
The Extension Manager does not work without internet access on the XWiki server. The alternative is the manual route: download the XAR file, import it via Administration and Import, and install every dependent extension separately. For installations in isolated networks this is a separate task that recurs with every update.
After installation, "LLM Application" appears in the applications panel. In the editor, a toolbar button opens the chat. The button uses the same icon as "Paste"; according to the documentation there is no dedicated icon yet.
Connecting a local model: Ollama and vLLM
Configuration has two levels: servers and models. A server describes the endpoint, a model is the concrete approval for users.
Create a server (Administration, LLM Application configuration):
| Field | Content | Note |
|---|---|---|
| Server name | any name, for example ollama-internal |
keep it unique; with duplicate names the first entry is ignored |
| URL prefix | base URL with a trailing / |
chat/completions, models and embeddings are appended to the prefix |
| Token | API key if the server requires one | leave empty for Ollama without authentication |
| Can Stream | streaming responses | disable temporarily for troubleshooting |
Typical URL prefix values:
| Server | URL prefix | Documentation |
|---|---|---|
| Ollama | http://ollama.internal:11434/v1/ |
Ollama, OpenAI compatibility |
| vLLM | http://vllm.internal:8000/v1/ |
vLLM, OpenAI-compatible server |
| Embeddings inside the XWiki process | leave empty | Internal Inference Server required |
The most common mistake with Ollama is the missing /v1/. Ollama serves its OpenAI-compatible API under /v1/, not at the root path (XWiki forum). The inference server has to be reachable from the XWiki server, not from the users' browsers: all requests go through XWiki.
Create models (below the chat in the LLM Application):
| Field | Meaning |
|---|---|
| Server name | the server created above |
| Type | "Large language model" for chat, "Embeddings model" for the index |
| Model ID | model name on the server, for example qwen3:32b on Ollama or the model path on vLLM |
| Number of Dimensions | embeddings only, for example 1024 |
| Context size | maximum context length in tokens, limits the chat history |
| Allow guests | access without sign-in; enable only deliberately |
| Group | groups allowed to use the model |
| Collections | collections whose content serves as context; empty means plain chat |
| Search results limit / Keyword search results limit | number of chunks from vector and keyword search |
| Context prompt | instruction containing the placeholder {{search_results}} |
| Chunk Template | rendering of a hit with {{url}}, {{index}} and {{content}} |
The LLM Application does not import models from the server automatically. This is intentional: admins should only offer approved models and be able to provide the same model with different collections under different names (XWiki forum). Descriptive names such as "IT handbook, with sources" work better than the technical model ID.
Which inference server fits depends on user count and hardware. Ollama suits getting started, vLLM suits many parallel requests; the comparison is in the article vLLM, Ollama or llama.cpp. How much GPU memory a model needs is covered in the article on VRAM sizing.
Indexing wiki content: collections and RAG
A collection is a bounded knowledge area with its own embedding model, chunking parameters and rights check (Index for the LLM Application). Admins find the link to the collections overview at the bottom of the LLM Application.
| Property | Options | Recommendation |
|---|---|---|
| Document store | internal (own documents, also via REST API) or XWiki (existing spaces) |
XWiki for wiki content |
| Document spaces | list of spaces to index | separate spaces by audience |
| Embedding Model | a configured embeddings model | multilingual, 1,024 dimensions |
| Chunking Method | maxChars only |
no alternative |
| Chunking Max Size | maximum length in characters, at least 10 | adjust to page structure and test |
| Chunking Overlap Offset | overlap in characters, smaller than half the maximum size | keep moderate |
| Rights Check Method | public, external, xwiki |
xwiki for spaces with page rights |
| Allow Guests / Query Groups | who may query the collection | groups rather than guests |
Chunking. The maxChars method searches within the maximum length for a heading, an empty line, a line break, a sentence end and a space, in that order, and splits at the first suitable point. A chunk can shrink to half the maximum size in the process. Which sizes work for German text with long sentences and tables is covered in the article on chunking strategies. The indexed chunks can be reviewed in a Live Data table of the collection, including embedding error messages.
Attachments. Documents in the internal store can have attachments whose text is extracted with Apache Tika. Scanned PDFs without a text layer yield no content; an OCR stage is not part of the extension.
Embedding model. Because of the fixed vector length of 1,024, models with exactly this dimension fit without loss:
| Model | Dimensions | Languages | Note |
|---|---|---|---|
| BGE-M3 | 1,024 | multilingual | context up to 8,192 tokens |
| multilingual-e5-large | 1,024 | multilingual | expects the prefixes query: and passage: |
| all-MiniLM-L6-v2 | 384 | English | bundled "Default" example, unsuitable for German content |
For models such as multilingual-e5, the model configuration has the fields "Embedding Index Prefix" and "Embedding Query Prefix". A comparison of further models for German text is in the article best embedding models for German.
Changing the embedding model or the chunking parameters requires re-indexing the collection. Without re-indexing, changed chunking values only apply the next time a document is edited. Users on the forum also report embedding errors with individual models served by Ollama (XWiki forum); testing with a small space before the full indexing run is worthwhile.
Access rights: what the chat may see
The index documentation is unambiguous here: regular XWiki access rights are not checked at query time. Access is controlled on two levels, through the collection and through a rights check method per document.
| Method | Checks | Suited for |
|---|---|---|
public |
nothing, every document in the collection is allowed | spaces that every authorised user may read in full |
external |
HTTP POST to your own URL, response per document true or false |
content from external systems with their own rights management |
xwiki |
standard XWiki page rights | only collections with the XWiki document store |
With external, XWiki sends the document IDs, the XWiki user name and, where available, LDAP identifiers, OIDC accounts and JWT identities. Missing values or errors count as "no access".
In practice this means:
- Cut collections by audience. A single collection for the entire wiki with the
publicmethod gives every authorised user of the collection all content as context, including content from spaces they cannot open in the wiki. - Choose
xwikifor wiki spaces. Only this method mirrors page rights. - Allow embedding models for both sides. The groups of the embedding model must include both the users whose edits are indexed and the users who ask questions in the chat.
- Guests only deliberately. "Allow guests" on models and collections opens access without sign-in; with API models this also incurs costs.
Why rights must be enforced in retrieval rather than through the prompt is explained in the article permissions in RAG systems.
MCP server and external integration
MCP server. Since version 0.8 the project includes a server for the Model Context Protocol, with an administration UI since 0.9. It makes wiki content accessible to AI agents and other MCP-capable clients. According to the version 0.10 source code:
| Aspect | Behaviour |
|---|---|
| Endpoint | /rest/wikis/<wiki>/aiLLM/mcp |
| Default state | enabled after installation, can be disabled per wiki |
| Tools | read tools on, write tools (pages, objects, attachments, schema) off |
| Rights | every access is checked against the XWiki rights of the authenticated user |
| Sign-in | OAuth metadata points to XWiki's OpenID Connect provider |
| Space filter | whitelist or blacklist for spaces and documents |
As of September 2026 there is no dedicated documentation page for the MCP server on extensions.xwiki.org. Anyone installing the LLM Application should therefore review the MCP configuration and disable the endpoint if it is not needed. How approvals for writing agents can be designed is covered in the article AI agents: permissions and approvals.
Chat in other applications. The Chat WebJar provides a widget that can be embedded in other web applications with a script tag. For signing in external users there is the token authenticator: the application signs a JWT with an Ed25519 key, XWiki creates or updates the user and takes over groups from the token. The documentation recommends a unique group prefix so that an external application cannot set groups such as XWikiAdminGroup (Token-based authentication).
Limits and known issues
| Topic | State in version 0.10 |
|---|---|
| Maturity | BETA, error messages are often terse; troubleshoot via the XWiki log and with streaming disabled |
| Hallucinations | possible despite context, according to the documentation including made-up references to context |
| Chunking | character-based only (maxChars), no structure-based or semantic splitting |
| Ranking | vector and keyword results are concatenated, no reranker |
| Vector length | fixed at 1,024, other dimensions are adjusted |
| Model list | empty after extension changes until the next restart (XWIKI-21887) |
| Offline operation | Extension Manager needs internet access, otherwise manual installation |
| Editor | insertion only in the WYSIWYG editor, XWiki syntax by copying into the source editor |
| Chat models inside the XWiki process | not supported |
For a wiki where employees look things up in handbooks and policies, this feature set is often sufficient, provided collections and rights are cut cleanly. Anyone combining content from several systems, needing reranking or wanting to measure answer quality systematically adds a separate RAG layer next to the wiki. How such measurements are set up is described in the article on RAG evaluation.
Our approach at WZ-IT
We set up the LLM Application as a project with a fixed sequence, on your infrastructure or in an environment we operate in Germany. Support, consulting and implementation by WZ-IT.
- Assessment. XWiki version, database, Solr, authentication and rights structure. If the version is below 17.4.0, we plan the platform upgrade first.
- Decide on model hosting. A local model on the AI Cube inside your own network, on a managed GPU server from WZ-IT with NVIDIA RTX PRO 4000 Blackwell (24 GB) or RTX PRO 6000 Blackwell (96 GB), or a European model API. We run the inference server with vLLM or Ollama.
- Collections and rights. Cut by audience, a rights check method that matches your permission structure, an embedding model for German content and a review of the MCP configuration.
- Test answer quality. Reference questions from the business side, source checks and tuning of chunking and context prompt. As a bounded project we offer this as a RAG Proof of Value.
- Operations on request. Updates of XWiki and the extension, monitoring and backups as XWiki managed hosting. If the LLM Application's feature set is not enough, we build an internal AI assistant that connects XWiki as one of several sources.
Further guides
- Atlassian Rovo alternative, self-hosted, wiki and AI layer without Atlassian Cloud.
- Onyx self-hosted: installation and comparison, a standalone AI search across several sources.
- Best embedding models for German, dimensions, licences and hosting compared.
- BookStack, Wiki.js, XWiki or Docmost, choosing the wiki before the AI question.
- What is RAG?, the basics of retrieval-augmented generation.
- AI solutions, the hub with all hosting options for models.
Want to make your XWiki content searchable with AI? We review your installation, connect a model on your own hardware or a managed GPU server and cut collections and rights to fit your wiki. Schedule a meeting
Sources
- XWiki Extensions, LLM project
- XWiki Extensions, LLM Application
- XWiki Extensions, Index for the LLM Application
- XWiki Extensions, LLM Internal Inference Server
- XWiki Extensions, Token-based authentication for the LLM Application
- XWiki Extensions, LLM Chat WebJar
- GitHub, xwiki-contrib/application-ai-llm
- XWiki Jira, LLMAI project
- XWiki Jira, LLMAI-164: keywordSearch is missing the wiki filter
- XWiki Jira, LLMAI-137: HTTP/2 upgrade headers with LM Studio
- XWiki Jira, XWIKI-21887
- XWiki forum, models from Ollama not auto-loaded
- XWiki forum, configuring the LLM Application with Ollama
- XWiki forum, indexing errors with Ollama embeddings
- XWiki Design, WAISE proposal
- Ollama, OpenAI compatibility
- vLLM, OpenAI-compatible server
- Hugging Face, BAAI/bge-m3
- Hugging Face, intfloat/multilingual-e5-large
- Hugging Face, sentence-transformers/all-MiniLM-L6-v2
Set up AI search for XWiki
We review your XWiki installation, connect a local or European model and set up collections with a rights check that matches your permission structure.
Frequently Asked Questions
Answers to important questions about this topic
No. XWiki Standard contains no AI feature. Chat, writing assistance and RAG search come from the LLM Application, an extension from the xwiki-contrib project. It is marked as BETA, licensed under LGPL 2.1 and, as of September 2026, available in version 0.10 released on 18 September 2026.
At least XWiki 17.4.0. The README in the GitHub repository names 17.4.0 as the minimum supported version, and since version 0.8 the extension is built on the XWiki 17.4 platform. The 16.2.0 figure on the extension page only applies to versions 0.3 to 0.7.2.
Yes. The LLM Application talks to any server with an OpenAI-compatible API. The URL prefix is the base URL including /v1/ and a trailing slash, for Ollama for example http://ollama.internal:11434/v1/. Chat models always run on an external inference server, never inside XWiki itself.
No, this is a common misconception. Regular XWiki access rights are not checked when the index is queried. Access is controlled through the groups of a collection and a rights check method per collection. Only the XWiki method checks page rights, and it only works for collections that index wiki spaces directly.
No. Every model that users see in the chat or that is used for embeddings has to be created as a separate model configuration with server, type, model ID and allowed groups. This is intentional, so that admins only offer approved models and can provide the same model with different collections.
A multilingual model with 1,024 dimensions, such as BGE-M3 or multilingual-e5-large. The extension's Solr index stores vectors with a fixed length of 1,024. Longer vectors are truncated, shorter ones padded with zeros. The bundled example model all-MiniLM-L6-v2 is trained on English text.
No. The documentation states explicitly that the model can still make up facts, reference context that does not exist or ignore the context it received. RAG reduces this risk but does not remove it. Answers therefore need to be shown with source links and checked with test questions.
It exposes wiki content as tools for AI agents through the Model Context Protocol at /rest/wikis/<wiki>/aiLLM/mcp. After installation the endpoint is enabled by default, read tools are on and write tools are off. Every access is checked against the XWiki rights of the authenticated user.
This is a known XWiki bug (XWIKI-21887). After installing, upgrading or uninstalling an extension, the model list stays empty until the next restart. The workaround is to restart XWiki after every change to the extension.
Not on the XWiki server. Chat models run on a separate inference server, which usually needs a GPU for local models. Embeddings can optionally be computed on the CPU inside the XWiki process through the LLM Internal Inference Server, which only supports Linux on x86-64.

Written by
Timo Wevelsiep
Co-Founder & CEO
Co-Founder of WZ-IT. Specialized in cloud infrastructure, open-source platforms and managed services for SMEs and enterprise clients worldwide.
LinkedInLet's Talk About Your Idea
Whether a specific IT challenge or just an idea - we look forward to the exchange. In a brief conversation, we'll evaluate together if and how your project fits with WZ-IT.





