Skip to content

Feature/new demo#78

Merged
qin-ctx merged 13 commits intovolcengine:mainfrom
A11en0:feature/new_demo
Feb 6, 2026
Merged

Feature/new demo#78
qin-ctx merged 13 commits intovolcengine:mainfrom
A11en0:feature/new_demo

Conversation

@A11en0
Copy link
Copy Markdown
Contributor

@A11en0 A11en0 commented Feb 5, 2026

Description

Memex is a CLI-based personal knowledge assistant demo powered by OpenViking. It demonstrates how to build a complete RAG application with:

  • Knowledge Management: Add files, directories, URLs to a personal knowledge base
  • Intelligent Q&A: RAG-based question answering with multi-turn conversation support
  • Session Memory: Automatic memory extraction and context-aware search via OpenViking Session API
  • Knowledge Browsing: Navigate with L0/L1/L2 context layers (abstract/overview/full)
  • Semantic Search: Quick and deep search with intent analysis
  • Feishu Integration: Import documents from Feishu/Lark (optional)

Related Issue

N/A

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test update

Changes Made

  • Added architecture diagram showing Memex CLI → MemexRecipe → MemexClient → OpenViking Core layers
  • Added Key Components table documenting MemexRecipe, MemexClient, MemexConfig, Commands
  • Added RAG Flow documentation (4-step process)
  • Added Configuration Options section (RAG parameters, environment variables)
  • Added Development section with project structure and test commands

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested this on the following platforms:
    • Linux
    • macOS
    • Windows

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Screenshots (if applicable)

N/A

A11en0 added 12 commits February 5, 2026 04:05
- CLI-based personal knowledge assistant powered by OpenViking
- Knowledge management: add files, directories, URLs
- Intelligent Q&A with RAG and multi-turn conversation
- Knowledge browsing with L0/L1/L2 context layers
- Semantic search with intent analysis
- Feishu/Lark MCP integration for document import
- Rich CLI interface with prompt_toolkit
- Fix /tree command to handle dict list return type
- Fix RAG recipe to load LLM config from ov.conf instead of removed attributes
- Fix find/search methods to use 'limit' parameter instead of 'top_k'
- Strip trailing slashes from URIs to prevent path errors
- Improve tree display to handle dict list return type
- Add recursive directory import with file type filtering
- Improve error handling for add_resource results
- Add proper cleanup on exit to kill AGFS processes
- Fix import_dir to use new directory handling logic
…ll content

- Lower default score_threshold from 0.3 to 0.1 (actual scores are 0.17-0.25)
- Fix build_context to use client.read() for full content instead of just abstract
- This fixes the issue where queries returned no results despite data being indexed
…ction, hybrid search, rerank

- P0: Integrate OpenViking Session for context-aware search with IntentAnalyzer
- P1: Add session.commit() for long-term memory extraction (6 categories)
- P2: Implement hybrid search strategy (find for simple, search for complex)
- P3: Add LLM-based rerank for improved result relevance

New CLI commands: /session, /commit, /memories
- abstract() only works for directories, not files
- Changed to try read() first, then abstract() for directories
- This fixes the issue where only 1 result was returned instead of 5
- Remove high_confidence_threshold and low_confidence_threshold
- Remove rerank (use OpenViking score directly)
- Remove confidence hints from system prompt
- Unified content loading: all results get full content (2000 chars)
- Simpler build_context without confidence logic
…xpansion

- Remove _should_use_deep_search and find() auto-selection
- Always use search() with session for IntentAnalyzer
- Add _expand_query() to expand Chinese queries with English keywords
- Example: 'OpenViking 怎么安装' → 'OpenViking 怎么安装 installation setup install pip'
- Installation doc now ranks #1 (was not in top 5 before)
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

- `/feishu-doc <id>` - Import Feishu document
- `/feishu-search <query>` - Search Feishu documents

Set `FEISHU_APP_ID` and `FEISHU_APP_SECRET` environment variables to enable.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if using app secret (tenant access key?), only doc with app permission can be imported?

can we improve to integrate and auto-refresh user access key

return {"status": "no_session"}
try:
result = self._session.commit()
return result
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here need wait_processed (before process end), for embedding work

if backend == "openai":
self._llm_client = OpenAI(
api_key=vlm.get("api_key"),
base_url=vlm.get("api_base"),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: add openai api_base default

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, I will fix this.


try:
content = self.client.read(uri)
content = content[:2000] if content else ""
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from my experience, [:2000] creates unexpected result. consider remove

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, I will fix this.

@ZaynJarvis
Copy link
Copy Markdown
Collaborator

idea of list of commands is great, would you mind merge with chatmem example, we can work on the same TUI product together.

@A11en0
Copy link
Copy Markdown
Contributor Author

A11en0 commented Feb 6, 2026

idea of list of commands is great, would you mind merge with chatmem example, we can work on the same TUI product together.

are you refering to merging the two directories into one?

- Add wait_processed() after session commit for memory embedding
- Add OpenAI api_base default (https://api.openai.com/v1)
- Remove [:2000] content truncation that caused unexpected results
@ZaynJarvis
Copy link
Copy Markdown
Collaborator

ZaynJarvis commented Feb 6, 2026

idea of list of commands is great, would you mind merge with chatmem example, we can work on the same TUI product together.

are you refering to merging the two directories into one?

yes, so there won't be two similar TUI feature, leading to ambiguity

@A11en0
Copy link
Copy Markdown
Contributor Author

A11en0 commented Feb 6, 2026

idea of list of commands is great, would you mind merge with chatmem example, we can work on the same TUI product together.

are you refering to merging the two directories into one?

yes, so there won't be two similar TUI feature, leading to ambiguity

I think it's fine, but these two projects may not completely align functionally.

@qin-ctx qin-ctx merged commit d101fac into volcengine:main Feb 6, 2026
1 check was pending
@ZaynJarvis
Copy link
Copy Markdown
Collaborator

@A11en0 in dir: examples/memex, uv run memex doesn't work, please provide better instructions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants