Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions changes/fix-search-skill.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
### Fixed

- **The skill leads a question in the owner's own words to meaning search first** (#884): `search conversations`,
then `search messages --discover`, then key words; the question as written, no filtering of the results by hand,
`from:me` for "I advised", and `--timeout` after `query.time-limit`. In Experiment B an agent with the old skill ran
71 searches by words and one by meaning.
- **`search conversations` takes the longer limit of an explicit `--timeout`**, and **`search messages --discover`
finds a name written as one word when the question spells it with a hyphen** (`Альфа-банк` finds `АльфаБанк`)
(cli-core 0.664.0 and 0.665.0, already in this build).
15 changes: 11 additions & 4 deletions skills/tg-cli/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,14 @@ summary; news digests remain separate future work. Permission: `messages.evidenc
only when the owner asks to include their notes or imported Drive documents**: it adds both to the messages, in one
answer, each hit typed (`message`, `note`, `document`). Imported Drive documents retain their Google link and edit time; `--source drive:<profile>` selects a registered Drive profile. `tg personal chats documents list CHAT_ID` shows documents linked in stored messages. Mail is memo's (`memo search mail`). Narrow with `tg personal search messages`, `search notes`,
`search conversations` (by meaning) or `search topics`; every search lives under `tg personal search`.
For a natural question or uncertain wording, use `tg personal search messages '<question>' --discover`
or MCP `discover: true`. It searches the local archive without model downloads, keeps hard filters
**For a question in the owner's own words** (a sentence, unsure wording, a name that may be misspelled, no chat
named), search in this order: `tg personal search conversations '<question>'` (by meaning and words; `conversations
status` shows which chats have vectors), then `tg personal search messages '<question>' --discover`, then key words.
Pass the question as the owner wrote it; do not cut it to one word first. Never filter the results yourself
(`grep -v`, `jq select`) by chat or sender: a hit in a chat you did not expect is often the answer. When the owner
says "I advised / I wrote", add `from:me`. A search that stops at its time limit answers `query.time-limit`: run it
again with `--timeout 60s` before trying other words.
For `--discover` (MCP `discover: true`): it searches the local archive without model downloads, keeps hard filters
and includes eligible direct replies. Inspect missing terms, parent links and the messages;
the first result and its score do not establish an answer. Explicit syntax remains strict.
**Without `--discover`, `tg personal search messages` also asks Telegram's search** (`--backend both`; `archive`
Expand Down Expand Up @@ -261,7 +267,8 @@ summary; news digests remain separate future work. Permission: `messages.evidenc
22. **Nothing relevant: search again in other words before saying it is not there.** A search finds the words
it is given, and a paraphrase misses. Try the words the answer itself would contain (a document's title, the
term the sender would use), one or two key words instead of a sentence, a synonym, the other language; for a
question, `--discover`. After two or three tries, say what you searched for.
question, `search conversations` and `--discover` first (trap 5). After two or three tries, say what you searched
for.

## The usual path

Expand Down Expand Up @@ -337,7 +344,7 @@ tg personal search messages "invoice march" --backend archive --json # this mac
tg personal search all "invoice march" --json # only when the owner asks: adds their notes and Drive documents
tg personal conversations links rebuild --chat -1001234567890 --json # the threads inside a group, from what was kept; then list | show
tg skill show link-conversations # only when the owner asks you to untangle a chat's threads yourself
tg personal search conversations "<question>" --json # by meaning, after the owner ran tg personal conversations embed --chat <chat>
tg personal search conversations "<question>" --json # by meaning and words: the first search for a question in the owner's words
tg personal watch --jsonl # new messages as {"type":"item","data"} lines, then a {"type":"end"} line
```

Expand Down
Loading