You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Keep only the notes a stranger cannot infer: SSE must end with
data: [DONE], Bearer is required off mock, FastAPI mounts skip
lifespan, and retrieval notes need their own stream_id.
Copy file name to clipboardExpand all lines: apps/ten-moss/README.md
+4-31Lines changed: 4 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,8 +37,6 @@ flowchart LR
37
37
class ctl,idx moss
38
38
```
39
39
40
-
Everything on the retrieval path runs inside the agent process. There is no network hop between the transcript arriving and the grounded prompt reaching the LLM.
41
-
42
40
## What's in this directory
43
41
44
42
This example ships the TEN app plus a small index builder; the run harness (playground, server, Taskfile, Dockerfile) comes from the TEN Framework, so `tenapp/` drops into any TEN checkout.
@@ -97,30 +95,9 @@ The Moss delta lives in `main_python`:
97
95
|`extension.py``on_cmd`| Tool: `query_context(arguments.query)` and return `{type: "llmresult", content: grounding}`. |
98
96
|`tenapp/property.json`|`voice_assistant` (ambient, auto-start) and `voice_assistant_tools`. |
Ctl->>LLM: context + [Current User Question] + text
117
-
LLM-->>TTS: streamed response
118
-
TTS-->>User: audio (via agora_rtc)
119
-
```
120
-
121
98
## Measure the latency
122
99
123
-
Every turn, the control extension logs the retrieval cost using the SDK's own `SearchResult.time_taken_ms` (surfaced by `ten-moss` as `last_time_taken_ms`), with the wall clock alongside for reference:
100
+
Logs use the SDK`SearchResult.time_taken_ms` (`ten-moss.last_time_taken_ms`), plus wall clock:
@@ -134,7 +111,7 @@ In the playground transcript you see, per turn, what Moss retrieved plus the SDK
134
111
<the assistant's spoken answer>
135
112
```
136
113
137
-
The extension also emits a per-turn latency breakdown, both as a grep-able log line and as a note in the transcript, so you can see where each turn's time goes:
@@ -147,11 +124,7 @@ The extension also emits a per-turn latency breakdown, both as a grep-able log l
147
124
|`llm_total_ms`| Full LLM generation for the turn. |
148
125
|`turn_total_ms`| ASR-final to LLM-final (the whole control-side turn). |
149
126
150
-
ASR timing appears in the Deepgram STT extension logs and TTS audio-out in the ElevenLabs TTS logs (both per turn in the worker log), so between those and the lines above you get the full component-by-component breakdown.
151
-
152
-
### Benchmark against TEN's default retrieval
153
-
154
-
TEN's shipped memory/RAG backends (memU, OceanBase PowerRAG, EverMemOS) are remote services that pay a network round trip every turn, whereas Moss retrieves in-process, so the same grounding is a local call of single-digit milliseconds.
127
+
ASR timing is in the Deepgram logs; TTS audio-out is in the ElevenLabs logs.
155
128
156
129
## Configuration
157
130
@@ -178,7 +151,7 @@ No Agora, no Deepgram, no mic. Gold phrases are the 10 FAQs.
178
151
python bench/run.py --echo-grounding
179
152
```
180
153
181
-
`--echo-grounding` needs no LLM key. With `MOSS_*` set it reports `moss_retrieval_ms`. Without them it still prints the table from the local FAQ file. The tool arm always searches in that smoke (no LLM to decide). See `bench/README.md`.
0 commit comments