nextcloud / nextcloud/context_chat_backend

[feat]: Add path and file name to embedded content

Open
#339 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
27
Forks
24
Avg merge
3d 4h
Merged PRs (30d)
6

Description

A lot of our files need the path and file name as a context to be understandable, so it would be great if they could be added to the embedded content.

Describe the solution you'd like

  • Given a file /foo/bar/Weekly/2026-08-24.docx which does not contain "weekly" or "2026-08-24".
    I'd like to query for "Summarize the weekly from 24th of August" and the context chat should find and summarize the file.
  • Given a file /foo/bar/CUSTOMER_NAME/Meeting - 2026-07-24.pdf which does not contain "CUSTOMER_NAME" or "2026-07-24".
    I'd like to query for "Summarize the meeting with CUSTOMER_NAME from 2026-07-24" and the context chat should find and summarize the file.

Describe alternatives you've considered

  • Adding the path / file name to the actual content works, but feels weird and I'm sure people will forget to do this in the future

Related issues

Known complications

The same file can be shared/mounted at different paths (different folder names), but embedding currently happens once per file ID. Maybe it's possible to embed the path/file name separately to avoid embedding a file once per share/mount?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Start by tracing where embedded content is created and keyed by file ID, then inspect how shared or mounted paths are represented. Done means queries can use a file’s path and name as context for retrieval, while accounting for files exposed through different paths without unnecessarily duplicating embeddings.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.