Skip to main content

UE Knowledge Base

PyPI version CI

Offline semantic search over Unreal Engine development knowledge — a curated Chinese-language knowledge corpus (29 topics: GAS, animation, AI, networking, UMG, Niagara, PCG, ...) plus a local RAG pipeline that indexes it with BAAI/bge-small-zh-v1.5 embeddings into ChromaDB.

Zero API cost. Fully offline after a one-time model download. Built for Chinese-speaking UE developers, and ready to plug into any AI agent, IDE, or CLI workflow.

knowledge/  (29 topics, ~84 markdown docs)
    │  ue-kb build          chunk + embed (BGE small, local)
    ▼
.chroma_db/  (vector index)
    │  ue-kb query "GAS cooldown"
    ▼
top-k semantic hits with source + heading

Features

  • 📚 Curated corpus: hand-written UE development docs in Chinese, covering Gameplay Ability System, character movement, animation, physics/collision, AI navigation, networking/replication, UMG/Slate, Niagara, Mass Entity, State Trees, PCG/procedural generation, materials/rendering, module build system, editor tools, and more.
  • 🧠 Local semantic search: BAAI/bge-small-zh-v1.5 (multilingual, ~100MB)
    • ChromaDB — no cloud APIs, no cost, works on a laptop CPU.
  • 🖥️ Simple CLI (ue-kb): build, query, info, download-model, plus --json output for agent integration.
  • 🔌 Extensible: index any extra UE docs with --source, or add engine source-indexing scripts under scripts/.

Quick start

# 1. Install
pip install -e .                 # or: pip install ue-knowledge-base

# 2. Download the embedding model once (~100MB)
ue-kb download-model
#    No manual setup needed in China — falls back to hf-mirror automatically

# 3. Build the index
ue-kb build

# 4. Search
ue-kb query "GAS ability cooldown" --top-k 5
ue-kb query "角色移动 速度衰减" --json   # machine-readable for agents

Install in mainland China without a proxy

GitHub / PyPI / HuggingFace are often slow or blocked from mainland China. This path works with zero proxy setup:

# 1. Get the code (GitHub mirrors, pick either)
git clone --depth 1 https://gh-proxy.com/https://github.com/dong273/ue-knowledge-base.git
#   git clone --depth 1 https://ghfast.top/https://github.com/dong273/ue-knowledge-base.git

# 2. Install dependencies (Tsinghua PyPI mirror)
pip install -e . -i https://pypi.tuna.tsinghua.edu.cn/simple

# 3. Download the model (mirror fallback is automatic)
ue-kb download-model
#    Falls back to hf-mirror.com automatically if the official source fails;
#    if it still fails, force it manually:
#    export HF_ENDPOINT=https://hf-mirror.com && ue-kb download-model

# 4. Build the index (fully local; offline from here on)
ue-kb build

# 5. Search
ue-kb query "GAS ability cooldown"

Tip: download-model automatically retries via the hf-mirror.com mirror when the official HuggingFace source fails — no manual HF_ENDPOINT needed.

Example

$ ue-kb query "GAS 技能冷却"
🔍 UE 知识库检索:GAS 技能冷却

[1] ue-gameplay-abilities/references/gas-input-integration.md › 问题 (匹配度: 21.1%)
    UE 项目同时使用 GAS (GameplayAbilitySystem) 和 Enhanced Input 时,容易陷入
    两个极端:- **全 GAS** → 所有输入走 GAS,但 WASD 轴输入不适合 GAS 的事件
    模型,且 CommitAbility 的 GC 延迟影响跳跃手感 ...
[2] ue-gameplay-abilities/references/gas-input-integration.md › Jump — GAS 即时技能 (匹配度: 14.2%)
    ...

Python API

from ue_knowledge.query import query

for hit in query("GAS cooldown", top_k=5):
    print(hit["source"], hit["heading"], hit["score"])

Extending the corpus

  1. Add a markdown file under knowledge/<topic>/ (use ##/### headings — the indexer chunks on heading boundaries).
  2. ue-kb build --force to rebuild.

For indexing Unreal Engine C++ header comments or Epic official docs, see scripts/index_engine_source.py and scripts/crawl_epic_docs.py (they expect local engine/UE paths — the extracted index data is generated locally and is not redistributed, out of respect for Epic's copyright).

License

MIT. The knowledge documents are original writing; no engine source code or verbatim Epic documentation is included.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ue_knowledge_base-0.2.0.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ue_knowledge_base-0.2.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file ue_knowledge_base-0.2.0.tar.gz.

File metadata

  • Download URL: ue_knowledge_base-0.2.0.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.30 {"installer":{"name":"uv","version":"0.11.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for ue_knowledge_base-0.2.0.tar.gz
Algorithm Hash digest
SHA256 7bea81f89ae1c31099ca6a2966fff57e774ee3db107c7e2105254d6af7e59302
MD5 a680b9927aa2cc83c4b141ae985d4755
BLAKE2b-256 cc2627e2a2d8a18886421d0d3167dcb69e3cd7142c1a8037184f0468d001fbdd

See more details on using hashes here.

File details

Details for the file ue_knowledge_base-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: ue_knowledge_base-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.30 {"installer":{"name":"uv","version":"0.11.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for ue_knowledge_base-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 daffb2f9fdea92b1156cf5e7fb6706912538aeea805fb940e629370dc19315de
MD5 30539dc0ede494a1cc6317a167776564
BLAKE2b-256 2832b8c9f05d3d3dac8dc543916e3e000ffe5c57f93321c13eb84d84321a2a55

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page