PHPackages                             egroupware/rag - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. egroupware/rag

ActiveEgroupware-app[Utility &amp; Helpers](/categories/utility)

egroupware/rag
==============

A RAG system for EGroupware.

26.6.20260619(2w ago)01.4k1[2 PRs](https://github.com/EGroupware/rag/pulls)1PHP

Since Jan 6Pushed 2d ago1 watchersCompare

[ Source](https://github.com/EGroupware/rag)[ Packagist](https://packagist.org/packages/egroupware/rag)[ RSS](/packages/egroupware-rag/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (21)Used By (1)

RAG (Retrieval-Augmented Generation) for EGroupware
===================================================

[](#rag-retrieval-augmented-generation-for-egroupware)

Features (planned or already implemented)
-----------------------------------------

[](#features-planned-or-already-implemented)

- stores embeddings for all supported applications in table `egw_rag`
- stores a fulltext index for all supported applications in table `egw_rag_fulltext`
- create AND keep the above indexes up-to-date when entries are added, updated or deleted
- provides search primitives applications can use to provide:
    - `Rag\Embeddings::searchEmbeddings()` a semantic search by given search-pattern
    - `Rag\Embeddings::searchFulltext()` a fulltext search either in [natural language mode](https://mariadb.com/docs/server/ha-and-performance/optimization-and-tuning/optimization-and-indexes/full-text-indexes/full-text-index-overview#in-natural-language-mode) or in [boolean mode](https://mariadb.com/docs/server/ha-and-performance/optimization-and-tuning/optimization-and-indexes/full-text-indexes/full-text-index-overview#in-boolean-mode), if operators are used (the default preference to add an `*` after each word, also swiches automatically to boolean mode!)
    - `Rag\Embeddings::search()` hybrid search combining semantic and fulltext search
    - the primitives return an array with ID =&gt; distance or relevance score of the embeddings or fulltext index
- UI for an application independent search

- show a (bigger) search-field
- show a (multiple) application selection, default all supported apps
- show a NM list with link-title, app-name and ID and onclick action to edit the entry
- replace old EPL search in avatar-menu with RAG, if available

- new RAG preference what to use in default search, if RAG is available (implementation in Api\\Storage):
    - fulltext search (default)
    - hybrid search (if RAG/Embedding is configured)
    - semantic search / RAG only
    - legacy search of the apps
    - search will still support # to find the ID
    - apps can prefer/overwrite the above, e.g. Addressbook to use its own phone-number search
- fulltext search supports [boolean search operators](https://mariadb.com/docs/server/ha-and-performance/optimization-and-tuning/optimization-and-indexes/full-text-indexes/full-text-index-overview#in-boolean-mode)
- preference to automatically append an asterisk (\*) after each search pattern, which is not enclosed in quotes ("), to also match words beginning with the pattern

> Please note:
>
> the fulltext index does NOT find patterns within a word, only complete words or words starting with the pattern, if the above preference is set (by default), or the `*` operator is added manually after the pattern e.g. `some*` will also find `something`, but not `awesome`!

- preference to keep sort-order from apps (default), or use relevance from RAG/fulltext search, when search in the apps
- UI of RAG allows sorting the search result by distance&amp;relevance (default), modification date, distance or relevance alone
- change search in filterbox, to include:
    - selection which search-type to use incl. legacy search
    - fulltext operator help (like in RAG UI)
- cache embeddings of the search-pattern to not always have to request them again
- store sha256 of chunks, to not regenerate embeddings of unchanged chunks
- support other embedding models AND modify schema to support its number of dimensions (the latter is not yet implemented!)
- make the results of the above searches available to AI agents / integrate with them

Supported applications
----------------------

[](#supported-applications)

- InfoLog
- Tracker
- allow app-plugins in apps namespace `EGroupware\\Rag` instead directly in RAG's `EGroupware\Rag\Embeddings\`
- Addressbook, Calendar, Timesheet, ProjectManager and Phpbrain (aka KnowledgeBase)
- other egroupware applications: Invoices, Resources, Records, ViDoTeach, ...

Requirements and installation
-----------------------------

[](#requirements-and-installation)

- MariaDB 11.8 for the required vector type to store and search for embeddings. Add the following to your docker-compose.override.yml to use MariaDB 11.8 (also works with EGroupware 23.1)

```
# /etc/egroupware-docker/docker-compose.override.yml
service:
  db:
    image: mariadb:11.8
    environment:
    - MARIADB_AUTO_UPGRADE=true

```

> The above will happen automatic with egroupware-docker-26 package (once it's released).

- [bge-m3](https://ollama.com/library/bge-m3) Embedding Model via either:
    - an [Ollama installation](https://ollama.com/blog/ollama-is-now-available-as-an-official-docker-image) with bge-m3 installed: `ollama pull bge-m3:latest`
    - or an OpenAI compatible endpoint and API key to access bge-m3 e.g. via IONOS AI Hub
- Make sure ollama is [reachable](https://docs.ollama.com/faq#how-can-i-expose-ollama-on-my-network) from the RAG container, by default it binds to 127.0.0.1:11434
- RAG application repo must be cloned into the EGroupware source directory (`/usr/share/egroupware` in an on-premise installation)

> RAG application will be delivered with regular EGroupware 26.x container images from next pre-release on.

- the RAG app then needs to be configured: `Admin > Applications > RAG > App Configuration`, by default it only does the fulltext index

App Configuration
-----------------

[](#app-configuration)

### General Configuration

[](#general-configuration)

- URL and optional API key for the [OpenAI compatible endpoint](https://docs.ollama.com/api/openai-compatibility)
- Add "/v1/" to your Ollama URL to access the OpenAI compatible endpoint
- (optional, without RAG just uses/creates the fulltext index)

> Ollama: you can NOT use the default localhost in an other container, use e.g. the docker0 address 172.17.0.1!

### Embedding Configuration

[](#embedding-configuration)

- name of an embedding model to use, defaults to `bge-m3`

> Currently 1024 dimensions are hard-coded in the schema, you need to change the schema manually for a different value!

- chunk-size and overlap for chunking the texts of the application entries (default is 500 and 50 chars)
- setting to minimize chunks by concatenating all texts (before splitting them into chunks), instead of chunk-splitting them all separate

> Calculating and storing Embeddings, and to much lower extend also the Fulltext index, costs a not to diminishing amount of storage for the tokens!

Usage for the supported apps
----------------------------

[](#usage-for-the-supported-apps)

- RAG search over all (supported) application is now shown in the avatar menu under `search`
- supported apps use by default the fulltext index for searching
- the above can be changed permanently via a preference or
- through the small RAG user-interface show in the filterbox

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance98

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~8 days

Total

20

Last Release

19d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/85a8407098a44193698887e739a263c1623a169548b3867103015d2b3c9eb78d?d=identicon)[ralfbecker](/maintainers/ralfbecker)

---

Top Contributors

[![ralfbecker](https://avatars.githubusercontent.com/u/972180?v=4)](https://github.com/ralfbecker "ralfbecker (81 commits)")[![nathangray](https://avatars.githubusercontent.com/u/10407710?v=4)](https://github.com/nathangray "nathangray (2 commits)")

### Embed Badge

![Health badge](/badges/egroupware-rag/health.svg)

```
[![Health](https://phpackages.com/badges/egroupware-rag/health.svg)](https://phpackages.com/packages/egroupware-rag)
```

###  Alternatives

[adamwojs/php-cs-fixer-phpdoc-force-fqcn

181.2M63](/packages/adamwojs-php-cs-fixer-phpdoc-force-fqcn)[dantleech/fink

Checks Links

2266.9k2](/packages/dantleech-fink)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
