feat: a Manas-scoped chat should reach its notes' attached documents
Maintainers usually reply within 1 day
Assessment
This issue has not been assessed yet.
Description
Document retrieval only happens in unscoped chat. A Manas-scoped chat searches documents not at all — it scopes by note membership, and a PDF blob has no membership of its own.
This is the wrong behaviour from the user's side. A Manas is a curated set of notes; if one of those notes has a PDF attached, that PDF's content is part of what the user curated. Scoping to the Manas currently makes the attachment less reachable than not scoping at all, which is the opposite of what narrowing should do.
What to build
Derive a document's scope from the notes that attach it: a chunk is in scope when any note in the selected Manas carries that sha256 as an attachment.
Pointers:
ManasContextLoader.merge/searchAllis where note scoping is applied todayNoteModel.attachmentscarries oneMediaAttachmentper NIP-92imetatag; the sha256 there is the join key toDocumentChunkModel.sha256RagPipelinecurrently gates document search on "no Manas selected" — that gate is what changes
Open questions
- A document attached to a note inside the Manas and a note outside it is in scope by this rule. That seems right — the content is the same content — but it is worth stating rather than discovering.
- Does the scoped top-K split between notes and chunks the same way unscoped does (
max(1, topK ~/ 2)), or should a narrow scope weight documents differently?
Part of #228 · Feature it follows from: #226
- Dominant language
- Dart
- Stars
- 2
- Forks
- 2
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 35
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from basictech01/uniun
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
basictech01/uniun#300 ·
Maintainers usually reply within 1 day
-
enhancement good first issue P2-Medium
Difficulty 5/5 Over a week Newbie friendliness 25/100
basictech01/uniun#296 ·
Maintainers usually reply within 1 day
-
bug good first issue P2-Medium
Difficulty 4/5 1-2 days Newbie friendliness 22/100
basictech01/uniun#293 ·
Maintainers usually reply within 1 day
-
bug P1-High
Difficulty 4/5 3-5 days Newbie friendliness 18/100
basictech01/uniun#286 · 2 comments ·
Maintainers usually reply within 1 day
-
P3-Low
Difficulty 4/5 1-2 days Newbie friendliness 30/100
basictech01/uniun#282 · 1 comment ·
Maintainers usually reply within 1 day
All issues in basictech01/uniun
Similar issues
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 65/100
chriskelly/wish-together#36 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
AppFlowy-IO/AppFlowy#9075 ·
-
Paste asks for iOS paste permission because the default context menu ignores SystemContextMenuPossibly taken @dorklein claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
maheshj01/searchfield#267 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
avdept/JellyBoxPlayer#375 ·
Maintainers usually reply within 1 day