egroupware/rag
Composer 安装命令:
composer require egroupware/rag
包简介
A RAG system for EGroupware.
README 文档
README
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-patternRag\Embeddings::searchFulltext()a fulltext search either in natural language mode or 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 => 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
- 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 findsomething, but notawesome!
- 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&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
- InfoLog
- Tracker
- allow app-plugins in apps namespace
EGroupware\<application>\Raginstead directly in RAG'sEGroupware\Rag\Embeddings\<application> - Addressbook, Calendar, Timesheet, ProjectManager and Phpbrain (aka KnowledgeBase)
- other egroupware applications: Invoices, Resources, Records, ViDoTeach, ...
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 Embedding Model via either:
- an Ollama installation 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
- an Ollama installation with bge-m3 installed:
- Make sure ollama is reachable 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/egroupwarein 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
General Configuration
- URL and optional API key for the OpenAI compatible endpoint
- 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
- 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
- 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
egroupware/rag 适用场景与选型建议
egroupware/rag 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.67k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 01 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 egroupware/rag 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 egroupware/rag 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 1.67k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 6
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2026-01-04