Commit Graph
21 Commits
Author SHA1 Message Date
Eric Wang 1fc72a704d chore(agent): use Chinese labels in user message context 2026-10-28 17:51:13 +08:00
Eric Wang 89acf4f617 fix(prompts): accept conversational time confirmations and improve clarification 2026-10-28 17:46:22 +08:00
Eric Wang 3317d652db fix(agent): immediately transfer accidents involving three or more vehicles 2026-10-28 13:36:31 +08:00
Eric Wang 20c5e39e9d fix(agent): reuse collected vehicle counts and avoid repeated questions 2026-10-28 11:30:56 +08:00
Eric Wang f9ec20cd81 Merge branch 'main' into langgraph-migration 2026-10-22 11:30:15 +08:00
Eric Wang c7ca781b28 perf(workflow): move photo and confirmation data to prompt tails 2026-10-22 11:26:15 +08:00
Eric Wang dd45c9d870 perf(workflow): move dynamic context out of fixed prompts 2026-10-22 10:58:20 +08:00
Eric Wang b0ff2e03b6 fix(workflow): align collection and extraction prompts for 20261022 2026-10-22 10:30:57 +08:00
Eric Wang 9e28f69b3c feat(agent): trusted time evidence and collection prompt optimization
- time_context.py: server-side observation clocks for relative-time
  evidence (anti client-forgery); resolves X分钟前/小时前 against the
  observation timestamp of the turn that produced them, never re-basing
  history on the current clock; flags historical references without a
  reliable baseline
- state: dialogue_timestamps keyed by dialogue message index, persisted
  with checkpoint; welcome seeds index 0
- collect: single clock per turn shared by reply/extraction/repair;
  time_evidence injected into runtime context; reply_validator hook
  rejects time claims lacking evidence (one shared repair budget);
  model still interprets facts and chooses actions
- prompts: collection prompt restructured (shorter, state-bound-to-action
  table, gatekeeper principle, time source rules); extraction prompt
  aligned; workflow@20261021 json updated to match
- evals: prompt_probes / prompt_compare / time_boundary probe scripts
  (supplementary checks, original cases untouched)
- docs: collection-prompt-optimization.md (method + baselines),
  time-boundary-fix.md (problem, design, verification)
- gitignore: editor artifact dirs (.agents/.claude/.vscode, skills-lock)

Verified: 171 unit tests pass (16 new time-context tests)
2026-10-22 09:41:32 +08:00
Eric Wang 894cb220ed Merge branch 'main' into langgraph-migration 2026-10-21 17:13:10 +08:00
Eric Wang fb9271efc5 fix(workflow): bind collection states to actions and relax eval wording 2026-10-21 16:51:19 +08:00
Eric Wang 4ead44ef3f Merge branch 'main' into langgraph-migration 2026-10-21 15:42:04 +08:00
Eric Wang 248eb41c78 fix(workflow): align non-motor accident extraction and evaluations 2026-10-21 15:34:11 +08:00
Eric Wang a5407e03b2 feat(agent): align prompts and runtime with workflow@20261020
- archive workflow/20261020 export (diff vs 20261016: collection prompt
  only - state-decides-body rule, route when info complete)
- prompts: collection.md updated; 6 photo/confirm prompts archived with
  source nodeIds; render_prompt replaces {{$vars}} (Asia/Shanghai clock,
  person fields, explicit 'not provided' for missing prefills)
- llm: message history passed as user/assistant roles (chatNode history=50);
  optional LLM_TEMPERATURE; FakeLLMService supports history-aware responders
- collect: context via system supplement, raw user input as user message
  (Text Editor#2 parity), shared validated_reply (one call, one repair)
- welcome: Assigned Reply#3 original text, stored in dialogue history
- transitions: 2004 plate-confirm entries (2003->2004/2005, 2004->2005)
- verified: prompt files byte-identical to workflow JSON (parametrized test)
2026-10-21 15:10:51 +08:00
Eric Wang dea2ea5b71 feat(workflow): add new workflow for accident information collection
- Introduced a comprehensive JSON configuration for a new workflow that includes user guidance, input handling, and AI chat integration.
- The workflow features nodes for system configuration, workflow start, and accident information collection, enhancing user interaction and data collection capabilities.
- Implemented various input types and configurations to support dynamic user interactions and improve overall workflow efficiency.
2026-10-16 17:01:47 +08:00
Eric Wang 6b8a548df3 fix(workflow): offer photo button guidance only when needed 2026-10-16 15:58:41 +08:00
Eric Wang 22853f1b5a fix(workflow): skip known accident details and guide off-topic replies 2026-10-16 15:16:16 +08:00
Eric Wang 4787d6eb79 fix(workflow): skip plate confirmation after photos and guide driver verification 2026-10-16 14:21:45 +08:00
Eric Wang ee7bff32dd feat(workflow): add October 16 accident information collection workflow 2026-10-16 11:33:04 +08:00
Xin Wang 87e616ab55 提示词添加车辆预先提取和手机号多次拼接输入 2026-02-03 17:33:45 +08:00
Xin Wang a1a4bceb9a Add api server code and workflow 2025-04-29 15:03:02 +08:00