claude-smart 0.2.41 → 0.2.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +17 -0
- package/README.md +1 -1
- package/bin/claude-smart.js +86 -48
- package/package.json +10 -3
- package/plugin/.claude-plugin/plugin.json +9 -3
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/plugin/README.md +2 -2
- package/plugin/dashboard/next.config.ts +9 -1
- package/plugin/pyproject.toml +2 -2
- package/plugin/scripts/_lib.sh +91 -0
- package/plugin/scripts/backend-service.sh +46 -15
- package/plugin/scripts/cli.sh +29 -1
- package/plugin/scripts/codex-hook.js +72 -4
- package/plugin/scripts/dashboard-build.sh +1 -0
- package/plugin/scripts/dashboard-service.sh +1 -0
- package/plugin/scripts/ensure-plugin-root.sh +7 -14
- package/plugin/scripts/hook_entry.sh +1 -0
- package/plugin/scripts/smart-install.sh +18 -2
- package/plugin/src/claude_smart/cli.py +72 -38
- package/plugin/src/claude_smart/context_format.py +11 -12
- package/plugin/src/claude_smart/cs_cite.py +26 -12
- package/plugin/src/claude_smart/ids.py +13 -5
- package/plugin/uv.lock +1 -1
- package/plugin/vendor/reflexio/.env.example +53 -0
- package/plugin/vendor/reflexio/LICENSE +201 -0
- package/plugin/vendor/reflexio/README.md +338 -0
- package/plugin/vendor/reflexio/pyproject.toml +271 -0
- package/plugin/vendor/reflexio/reflexio/README.md +184 -0
- package/plugin/vendor/reflexio/reflexio/__init__.py +166 -0
- package/plugin/vendor/reflexio/reflexio/benchmarks/__init__.py +1 -0
- package/plugin/vendor/reflexio/reflexio/benchmarks/retrieval_latency/README.md +109 -0
- package/plugin/vendor/reflexio/reflexio/benchmarks/retrieval_latency/__init__.py +1 -0
- package/plugin/vendor/reflexio/reflexio/benchmarks/retrieval_latency/backends.py +175 -0
- package/plugin/vendor/reflexio/reflexio/benchmarks/retrieval_latency/bench.py +642 -0
- package/plugin/vendor/reflexio/reflexio/benchmarks/retrieval_latency/embed_cache.py +330 -0
- package/plugin/vendor/reflexio/reflexio/benchmarks/retrieval_latency/report.py +317 -0
- package/plugin/vendor/reflexio/reflexio/benchmarks/retrieval_latency/results/report.md +43 -0
- package/plugin/vendor/reflexio/reflexio/benchmarks/retrieval_latency/results/results.json +4478 -0
- package/plugin/vendor/reflexio/reflexio/benchmarks/retrieval_latency/scenarios.py +134 -0
- package/plugin/vendor/reflexio/reflexio/benchmarks/retrieval_latency/seed.py +255 -0
- package/plugin/vendor/reflexio/reflexio/cli/README.md +287 -0
- package/plugin/vendor/reflexio/reflexio/cli/__init__.py +0 -0
- package/plugin/vendor/reflexio/reflexio/cli/__main__.py +56 -0
- package/plugin/vendor/reflexio/reflexio/cli/_client.py +86 -0
- package/plugin/vendor/reflexio/reflexio/cli/app.py +127 -0
- package/plugin/vendor/reflexio/reflexio/cli/bootstrap_config.py +266 -0
- package/plugin/vendor/reflexio/reflexio/cli/codex_auth.py +503 -0
- package/plugin/vendor/reflexio/reflexio/cli/commands/__init__.py +0 -0
- package/plugin/vendor/reflexio/reflexio/cli/commands/admin_cmd.py +65 -0
- package/plugin/vendor/reflexio/reflexio/cli/commands/agent_playbooks.py +503 -0
- package/plugin/vendor/reflexio/reflexio/cli/commands/api.py +114 -0
- package/plugin/vendor/reflexio/reflexio/cli/commands/auth.py +109 -0
- package/plugin/vendor/reflexio/reflexio/cli/commands/config_cmd.py +511 -0
- package/plugin/vendor/reflexio/reflexio/cli/commands/doctor.py +127 -0
- package/plugin/vendor/reflexio/reflexio/cli/commands/embeddings.py +53 -0
- package/plugin/vendor/reflexio/reflexio/cli/commands/interactions.py +478 -0
- package/plugin/vendor/reflexio/reflexio/cli/commands/profiles.py +303 -0
- package/plugin/vendor/reflexio/reflexio/cli/commands/services.py +289 -0
- package/plugin/vendor/reflexio/reflexio/cli/commands/setup_cmd.py +961 -0
- package/plugin/vendor/reflexio/reflexio/cli/commands/shortcuts.py +285 -0
- package/plugin/vendor/reflexio/reflexio/cli/commands/status_cmd.py +143 -0
- package/plugin/vendor/reflexio/reflexio/cli/commands/user_playbooks.py +373 -0
- package/plugin/vendor/reflexio/reflexio/cli/env_loader.py +284 -0
- package/plugin/vendor/reflexio/reflexio/cli/errors.py +217 -0
- package/plugin/vendor/reflexio/reflexio/cli/log_format.py +247 -0
- package/plugin/vendor/reflexio/reflexio/cli/output.py +867 -0
- package/plugin/vendor/reflexio/reflexio/cli/paths.py +41 -0
- package/plugin/vendor/reflexio/reflexio/cli/run_services.py +391 -0
- package/plugin/vendor/reflexio/reflexio/cli/state.py +204 -0
- package/plugin/vendor/reflexio/reflexio/cli/stop_services.py +96 -0
- package/plugin/vendor/reflexio/reflexio/cli/utils.py +329 -0
- package/plugin/vendor/reflexio/reflexio/client/__init__.py +3 -0
- package/plugin/vendor/reflexio/reflexio/client/cache.py +150 -0
- package/plugin/vendor/reflexio/reflexio/client/client.py +2613 -0
- package/plugin/vendor/reflexio/reflexio/defaults.py +23 -0
- package/plugin/vendor/reflexio/reflexio/integrations/__init__.py +0 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/.clawhubignore +7 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/README.md +274 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/TESTING.md +517 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/hook/handler.js +473 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/package-lock.json +2156 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/package.json +18 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/hook/handler.ts +241 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/hook/setup.ts +140 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/index.ts +130 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/lib/publish.ts +113 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/lib/search.ts +52 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/lib/server.ts +103 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/lib/sqlite-buffer.ts +156 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/lib/user-id.ts +134 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/openclaw.plugin.json +41 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/package.json +17 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/rules/reflexio.md +24 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/plugin/skills/reflexio/SKILL.md +48 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/publish_clawhub.sh +278 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/references/HOOK.md +164 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/scripts/install.sh +36 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/scripts/uninstall.sh +35 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/tests/publish.test.ts +27 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/tests/search.test.ts +31 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/tests/server.test.ts +42 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/tests/setup.test.ts +49 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/tests/sqlite-buffer.test.ts +91 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/tests/user-id.test.ts +50 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/tsconfig.json +16 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/types/openclaw.d.ts +230 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw/vitest.config.ts +13 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/README.md +120 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/TESTING.md +168 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/package-lock.json +1657 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/package.json +16 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/plugin/HEARTBEAT.md +6 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/plugin/README.md +84 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/plugin/SKILL.md +194 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/plugin/_meta.json +6 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/plugin/agents/reflexio-extractor.md +45 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/plugin/hook/handler.ts +214 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/plugin/hook/setup.ts +55 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/plugin/index.ts +327 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/plugin/lib/consolidate.ts +233 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/plugin/lib/dedup.ts +80 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/plugin/lib/io.ts +155 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/plugin/lib/openclaw-cli.ts +67 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/plugin/lib/search.ts +33 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/plugin/lib/write-playbook.ts +76 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/plugin/lib/write-profile.ts +79 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/plugin/openclaw.plugin.json +46 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/plugin/package.json +18 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/plugin/prompts/README.md +36 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/plugin/prompts/full_consolidation.md +56 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/plugin/prompts/playbook_extraction.md +217 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/plugin/prompts/profile_extraction.md +132 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/plugin/skills/reflexio-consolidate/SKILL.md +33 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/plugin/skills/reflexio-embedded/SKILL.md +194 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/references/HOOK.md +18 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/references/architecture.md +49 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/references/comparison.md +31 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/references/future-work.md +47 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/references/porting-notes.md +52 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/scripts/install.sh +52 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/scripts/uninstall.sh +36 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/tests/consolidate.test.ts +135 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/tests/dedup.test.ts +104 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/tests/io.test.ts +175 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/tests/search.test.ts +66 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/tests/smoke-test.ts +140 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/tests/write-playbook.test.ts +93 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/tests/write-profile.test.ts +174 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/tsconfig.json +16 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/types/openclaw.d.ts +230 -0
- package/plugin/vendor/reflexio/reflexio/integrations/openclaw-embedded/vitest.config.ts +7 -0
- package/plugin/vendor/reflexio/reflexio/lib/__init__.py +23 -0
- package/plugin/vendor/reflexio/reflexio/lib/_agent_playbook.py +310 -0
- package/plugin/vendor/reflexio/reflexio/lib/_base.py +225 -0
- package/plugin/vendor/reflexio/reflexio/lib/_config.py +83 -0
- package/plugin/vendor/reflexio/reflexio/lib/_dashboard.py +266 -0
- package/plugin/vendor/reflexio/reflexio/lib/_generation.py +176 -0
- package/plugin/vendor/reflexio/reflexio/lib/_interactions.py +334 -0
- package/plugin/vendor/reflexio/reflexio/lib/_operations.py +153 -0
- package/plugin/vendor/reflexio/reflexio/lib/_profiles.py +545 -0
- package/plugin/vendor/reflexio/reflexio/lib/_reflection.py +52 -0
- package/plugin/vendor/reflexio/reflexio/lib/_search.py +167 -0
- package/plugin/vendor/reflexio/reflexio/lib/_storage_labels.py +103 -0
- package/plugin/vendor/reflexio/reflexio/lib/_user_playbook.py +288 -0
- package/plugin/vendor/reflexio/reflexio/lib/reflexio_lib.py +27 -0
- package/plugin/vendor/reflexio/reflexio/models/__init__.py +0 -0
- package/plugin/vendor/reflexio/reflexio/models/api_schema/__init__.py +0 -0
- package/plugin/vendor/reflexio/reflexio/models/api_schema/braintrust_schema.py +141 -0
- package/plugin/vendor/reflexio/reflexio/models/api_schema/common.py +41 -0
- package/plugin/vendor/reflexio/reflexio/models/api_schema/domain/__init__.py +3 -0
- package/plugin/vendor/reflexio/reflexio/models/api_schema/domain/entities.py +1103 -0
- package/plugin/vendor/reflexio/reflexio/models/api_schema/domain/enums.py +63 -0
- package/plugin/vendor/reflexio/reflexio/models/api_schema/eval_overview_schema.py +487 -0
- package/plugin/vendor/reflexio/reflexio/models/api_schema/internal_schema.py +28 -0
- package/plugin/vendor/reflexio/reflexio/models/api_schema/pending_tool_call_schema.py +83 -0
- package/plugin/vendor/reflexio/reflexio/models/api_schema/retriever_schema.py +766 -0
- package/plugin/vendor/reflexio/reflexio/models/api_schema/service_schemas.py +9 -0
- package/plugin/vendor/reflexio/reflexio/models/api_schema/stall_state_schema.py +32 -0
- package/plugin/vendor/reflexio/reflexio/models/api_schema/ui/__init__.py +3 -0
- package/plugin/vendor/reflexio/reflexio/models/api_schema/ui/converters.py +177 -0
- package/plugin/vendor/reflexio/reflexio/models/api_schema/ui/entities.py +129 -0
- package/plugin/vendor/reflexio/reflexio/models/api_schema/ui/enums.py +25 -0
- package/plugin/vendor/reflexio/reflexio/models/api_schema/validators.py +280 -0
- package/plugin/vendor/reflexio/reflexio/models/config_schema.py +908 -0
- package/plugin/vendor/reflexio/reflexio/models/py.typed +0 -0
- package/plugin/vendor/reflexio/reflexio/server/OVERVIEW.md +90 -0
- package/plugin/vendor/reflexio/reflexio/server/README.md +616 -0
- package/plugin/vendor/reflexio/reflexio/server/__init__.py +210 -0
- package/plugin/vendor/reflexio/reflexio/server/__main__.py +132 -0
- package/plugin/vendor/reflexio/reflexio/server/_auth.py +25 -0
- package/plugin/vendor/reflexio/reflexio/server/api.py +2714 -0
- package/plugin/vendor/reflexio/reflexio/server/api_endpoints/account_api.py +143 -0
- package/plugin/vendor/reflexio/reflexio/server/api_endpoints/health_api.py +91 -0
- package/plugin/vendor/reflexio/reflexio/server/api_endpoints/pending_tool_call_api.py +572 -0
- package/plugin/vendor/reflexio/reflexio/server/api_endpoints/precondition_checks.py +66 -0
- package/plugin/vendor/reflexio/reflexio/server/api_endpoints/publisher_api.py +540 -0
- package/plugin/vendor/reflexio/reflexio/server/api_endpoints/request_context.py +50 -0
- package/plugin/vendor/reflexio/reflexio/server/api_endpoints/stall_state_api.py +100 -0
- package/plugin/vendor/reflexio/reflexio/server/cache/__init__.py +15 -0
- package/plugin/vendor/reflexio/reflexio/server/cache/reflexio_cache.py +208 -0
- package/plugin/vendor/reflexio/reflexio/server/correlation.py +46 -0
- package/plugin/vendor/reflexio/reflexio/server/llm/__init__.py +30 -0
- package/plugin/vendor/reflexio/reflexio/server/llm/embedding_service.py +110 -0
- package/plugin/vendor/reflexio/reflexio/server/llm/image_utils.py +55 -0
- package/plugin/vendor/reflexio/reflexio/server/llm/litellm_client.py +1595 -0
- package/plugin/vendor/reflexio/reflexio/server/llm/llm_utils.py +112 -0
- package/plugin/vendor/reflexio/reflexio/server/llm/model_defaults.py +469 -0
- package/plugin/vendor/reflexio/reflexio/server/llm/providers/__init__.py +1 -0
- package/plugin/vendor/reflexio/reflexio/server/llm/providers/claude_code_provider.py +1122 -0
- package/plugin/vendor/reflexio/reflexio/server/llm/providers/claude_code_stream_parser.py +197 -0
- package/plugin/vendor/reflexio/reflexio/server/llm/providers/embedding_service_provider.py +210 -0
- package/plugin/vendor/reflexio/reflexio/server/llm/providers/local_embedding_provider.py +213 -0
- package/plugin/vendor/reflexio/reflexio/server/llm/providers/nomic_embedding_provider.py +255 -0
- package/plugin/vendor/reflexio/reflexio/server/llm/rerank/__init__.py +6 -0
- package/plugin/vendor/reflexio/reflexio/server/llm/rerank/cross_encoder_reranker.py +177 -0
- package/plugin/vendor/reflexio/reflexio/server/llm/rerank/llm_reranker.py +148 -0
- package/plugin/vendor/reflexio/reflexio/server/llm/tools.py +699 -0
- package/plugin/vendor/reflexio/reflexio/server/operation_limiter.py +179 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/__init__.py +0 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/_dispatchers.py +54 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/README.md +121 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/agent_success_evaluation/v1.0.0.prompt.md +58 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/agent_success_evaluation_with_comparison/v1.0.0.prompt.md +76 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/answer_synthesis/v1.5.2.prompt.md +88 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/compress_session_for_query/v1.3.0.prompt.md +31 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/document_expansion/v1.0.0.prompt.md +20 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/memory_reflection/v1.0.0.prompt.md +53 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/memory_reflection/v1.1.0.prompt.md +57 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/memory_reflection/v1.2.0.prompt.md +68 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/memory_reflection/v1.3.0.prompt.md +70 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/memory_reflection/v1.4.0.prompt.md +77 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/memory_reflection/v1.5.0.prompt.md +82 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/memory_reflection/v1.6.0.prompt.md +83 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_aggregation/v2.1.0.prompt.md +193 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_aggregation/v2.2.0.prompt.md +206 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_consolidation/v1.0.0-deprecated.prompt.md +66 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_consolidation/v1.0.0.prompt.md +43 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_consolidation/v1.1.0.prompt.md +46 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_consolidation/v2.0.0-deprecated.prompt.md +64 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_consolidation/v2.0.0.prompt.md +39 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_consolidation/v2.1.0.prompt.md +39 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_consolidation/v2.2.0.prompt.md +47 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_consolidation/v2.3.0.prompt.md +58 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_extraction_context/v4.0.2.prompt.md +254 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_extraction_context/v4.1.0.prompt.md +274 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_extraction_context/v4.2.0.prompt.md +279 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_extraction_context_expert/v1.0.0.prompt.md +73 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_extraction_context_expert/v2.0.0.prompt.md +86 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_extraction_context_expert/v3.0.0.prompt.md +97 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_extraction_context_expert/v3.1.0.prompt.md +119 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_extraction_context_expert/v3.2.0.prompt.md +123 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_extraction_context_expert/v3.3.0.prompt.md +127 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_extraction_main/v1.0.0.prompt.md +14 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_extraction_main/v1.1.0.prompt.md +24 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_extraction_main/v1.2.0.prompt.md +29 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_extraction_main_expert/v1.0.0.prompt.md +11 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_extraction_main_expert/v1.1.0.prompt.md +21 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_extraction_main_expert/v1.2.0.prompt.md +25 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_optimizer_judge/v1.0.0.prompt.md +37 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_optimizer_judge/v1.1.0.prompt.md +40 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_optimizer_judge/v1.2.0.prompt.md +36 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_should_generate/v1.0.0.prompt.md +45 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_should_generate/v2.0.0.prompt.md +81 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_should_generate/v3.0.0.prompt.md +80 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/playbook_should_generate_expert/v1.0.0.prompt.md +34 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/profile_deduplication/v1.0.0.prompt.md +116 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/profile_should_generate/v1.0.0.prompt.md +33 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/profile_should_generate_override/v1.0.0.prompt.md +16 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/profile_update_instruction_start/v1.0.0.prompt.md +140 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/profile_update_instruction_start/v1.1.0.prompt.md +160 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/profile_update_main/v1.0.0.prompt.md +14 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/query_reformulation/v1.0.0.prompt.md +19 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/rerank_relevance/v1.1.0.prompt.md +44 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/shadow_comparison/v1.0.0.prompt.md +43 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/shadow_content_evaluation/v1.0.0.prompt.md +33 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_evaluation/prompt_evaluation_dataset/feedback_extraction_main_v1.jsonl +10 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_evaluation/prompt_evaluation_dataset/profile_update_main_v1.jsonl +10 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_manager.py +280 -0
- package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_schema.py +11 -0
- package/plugin/vendor/reflexio/reflexio/server/services/agent_success_evaluation/_eval_health.py +131 -0
- package/plugin/vendor/reflexio/reflexio/server/services/agent_success_evaluation/agent_success_evaluation_constants.py +60 -0
- package/plugin/vendor/reflexio/reflexio/server/services/agent_success_evaluation/agent_success_evaluation_service.py +228 -0
- package/plugin/vendor/reflexio/reflexio/server/services/agent_success_evaluation/agent_success_evaluation_utils.py +87 -0
- package/plugin/vendor/reflexio/reflexio/server/services/agent_success_evaluation/agent_success_evaluator.py +372 -0
- package/plugin/vendor/reflexio/reflexio/server/services/agent_success_evaluation/delayed_group_evaluator.py +156 -0
- package/plugin/vendor/reflexio/reflexio/server/services/agent_success_evaluation/group_evaluation_runner.py +340 -0
- package/plugin/vendor/reflexio/reflexio/server/services/agent_success_evaluation/regen_jobs.py +471 -0
- package/plugin/vendor/reflexio/reflexio/server/services/base_generation_service.py +1626 -0
- package/plugin/vendor/reflexio/reflexio/server/services/braintrust/__init__.py +0 -0
- package/plugin/vendor/reflexio/reflexio/server/services/braintrust/_cron.py +196 -0
- package/plugin/vendor/reflexio/reflexio/server/services/braintrust/_encryption.py +101 -0
- package/plugin/vendor/reflexio/reflexio/server/services/braintrust/client.py +167 -0
- package/plugin/vendor/reflexio/reflexio/server/services/braintrust/service.py +281 -0
- package/plugin/vendor/reflexio/reflexio/server/services/configurator/base_configurator.py +179 -0
- package/plugin/vendor/reflexio/reflexio/server/services/configurator/config_storage.py +62 -0
- package/plugin/vendor/reflexio/reflexio/server/services/configurator/configurator.py +87 -0
- package/plugin/vendor/reflexio/reflexio/server/services/configurator/local_file_config_storage.py +187 -0
- package/plugin/vendor/reflexio/reflexio/server/services/configurator/test_config_storage.py +162 -0
- package/plugin/vendor/reflexio/reflexio/server/services/deduplication_utils.py +112 -0
- package/plugin/vendor/reflexio/reflexio/server/services/evaluation_overview/__init__.py +0 -0
- package/plugin/vendor/reflexio/reflexio/server/services/evaluation_overview/distribution.py +33 -0
- package/plugin/vendor/reflexio/reflexio/server/services/evaluation_overview/eval_sampler.py +126 -0
- package/plugin/vendor/reflexio/reflexio/server/services/evaluation_overview/group_aggregation.py +192 -0
- package/plugin/vendor/reflexio/reflexio/server/services/evaluation_overview/hero_state.py +75 -0
- package/plugin/vendor/reflexio/reflexio/server/services/evaluation_overview/rule_attribution.py +97 -0
- package/plugin/vendor/reflexio/reflexio/server/services/evaluation_overview/service.py +515 -0
- package/plugin/vendor/reflexio/reflexio/server/services/evaluation_overview/shadow_aggregation.py +90 -0
- package/plugin/vendor/reflexio/reflexio/server/services/extraction/__init__.py +0 -0
- package/plugin/vendor/reflexio/reflexio/server/services/extraction/agent_run_records.py +91 -0
- package/plugin/vendor/reflexio/reflexio/server/services/extraction/invariants.py +303 -0
- package/plugin/vendor/reflexio/reflexio/server/services/extraction/outcome.py +25 -0
- package/plugin/vendor/reflexio/reflexio/server/services/extraction/pending_tool_call_dispatch.py +351 -0
- package/plugin/vendor/reflexio/reflexio/server/services/extraction/plan.py +138 -0
- package/plugin/vendor/reflexio/reflexio/server/services/extraction/prior_answer_search.py +217 -0
- package/plugin/vendor/reflexio/reflexio/server/services/extraction/resumable_agent.py +468 -0
- package/plugin/vendor/reflexio/reflexio/server/services/extraction/resume_scheduler.py +171 -0
- package/plugin/vendor/reflexio/reflexio/server/services/extraction/resume_worker.py +777 -0
- package/plugin/vendor/reflexio/reflexio/server/services/extraction/tools.py +1125 -0
- package/plugin/vendor/reflexio/reflexio/server/services/extractor_config_utils.py +91 -0
- package/plugin/vendor/reflexio/reflexio/server/services/extractor_interaction_utils.py +251 -0
- package/plugin/vendor/reflexio/reflexio/server/services/generation_service.py +689 -0
- package/plugin/vendor/reflexio/reflexio/server/services/operation_state_utils.py +835 -0
- package/plugin/vendor/reflexio/reflexio/server/services/playbook/README.md +89 -0
- package/plugin/vendor/reflexio/reflexio/server/services/playbook/playbook_aggregator.py +1388 -0
- package/plugin/vendor/reflexio/reflexio/server/services/playbook/playbook_consolidator.py +960 -0
- package/plugin/vendor/reflexio/reflexio/server/services/playbook/playbook_extractor.py +436 -0
- package/plugin/vendor/reflexio/reflexio/server/services/playbook/playbook_generation_service.py +808 -0
- package/plugin/vendor/reflexio/reflexio/server/services/playbook/playbook_service_constants.py +28 -0
- package/plugin/vendor/reflexio/reflexio/server/services/playbook/playbook_service_utils.py +362 -0
- package/plugin/vendor/reflexio/reflexio/server/services/playbook_optimizer/__init__.py +24 -0
- package/plugin/vendor/reflexio/reflexio/server/services/playbook_optimizer/assistant_webhook.py +246 -0
- package/plugin/vendor/reflexio/reflexio/server/services/playbook_optimizer/gepa_adapter.py +291 -0
- package/plugin/vendor/reflexio/reflexio/server/services/playbook_optimizer/judge.py +97 -0
- package/plugin/vendor/reflexio/reflexio/server/services/playbook_optimizer/models.py +96 -0
- package/plugin/vendor/reflexio/reflexio/server/services/playbook_optimizer/optimizer.py +645 -0
- package/plugin/vendor/reflexio/reflexio/server/services/playbook_optimizer/rollout.py +35 -0
- package/plugin/vendor/reflexio/reflexio/server/services/playbook_optimizer/scenario_resolver.py +93 -0
- package/plugin/vendor/reflexio/reflexio/server/services/playbook_optimizer/scheduler.py +174 -0
- package/plugin/vendor/reflexio/reflexio/server/services/pre_retrieval/__init__.py +26 -0
- package/plugin/vendor/reflexio/reflexio/server/services/pre_retrieval/_document_expander.py +179 -0
- package/plugin/vendor/reflexio/reflexio/server/services/pre_retrieval/_query_reformulator.py +297 -0
- package/plugin/vendor/reflexio/reflexio/server/services/profile/profile_deduplicator.py +741 -0
- package/plugin/vendor/reflexio/reflexio/server/services/profile/profile_extractor.py +462 -0
- package/plugin/vendor/reflexio/reflexio/server/services/profile/profile_generation_service.py +734 -0
- package/plugin/vendor/reflexio/reflexio/server/services/profile/profile_generation_service_utils.py +290 -0
- package/plugin/vendor/reflexio/reflexio/server/services/reflection/__init__.py +17 -0
- package/plugin/vendor/reflexio/reflexio/server/services/reflection/reflection_extractor.py +247 -0
- package/plugin/vendor/reflexio/reflexio/server/services/reflection/reflection_service.py +800 -0
- package/plugin/vendor/reflexio/reflexio/server/services/reflection/reflection_service_utils.py +146 -0
- package/plugin/vendor/reflexio/reflexio/server/services/retrieval/__init__.py +0 -0
- package/plugin/vendor/reflexio/reflexio/server/services/retrieval/relevance_floor.py +70 -0
- package/plugin/vendor/reflexio/reflexio/server/services/search/__init__.py +0 -0
- package/plugin/vendor/reflexio/reflexio/server/services/service_utils.py +671 -0
- package/plugin/vendor/reflexio/reflexio/server/services/shadow_comparison/__init__.py +1 -0
- package/plugin/vendor/reflexio/reflexio/server/services/shadow_comparison/judge.py +184 -0
- package/plugin/vendor/reflexio/reflexio/server/services/shadow_comparison/outcome.py +81 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/constants.py +2 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/error.py +11 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/retention.py +154 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/retention_mixin.py +155 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/sqlite_storage/__init__.py +59 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/sqlite_storage/_agent_run.py +1253 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/sqlite_storage/_base.py +1945 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/sqlite_storage/_extras.py +600 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/sqlite_storage/_operations.py +346 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/sqlite_storage/_playbook.py +1378 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/sqlite_storage/_profiles.py +747 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/sqlite_storage/_requests.py +263 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/sqlite_storage/_shadow_verdicts.py +193 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/sqlite_storage/_share_links.py +166 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/sqlite_storage/_stall_state.py +217 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/storage_base/__init__.py +153 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/storage_base/_agent_run.py +372 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/storage_base/_base.py +71 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/storage_base/_extras.py +235 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/storage_base/_operations.py +170 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/storage_base/_playbook.py +677 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/storage_base/_profiles.py +250 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/storage_base/_requests.py +154 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/storage_base/_shadow_verdicts.py +130 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/storage_base/_share_links.py +93 -0
- package/plugin/vendor/reflexio/reflexio/server/services/storage/storage_base/_stall_state.py +76 -0
- package/plugin/vendor/reflexio/reflexio/server/services/unified_search_service.py +568 -0
- package/plugin/vendor/reflexio/reflexio/server/site_var/README.md +77 -0
- package/plugin/vendor/reflexio/reflexio/server/site_var/feature_flags.py +116 -0
- package/plugin/vendor/reflexio/reflexio/server/site_var/site_var_manager.py +263 -0
- package/plugin/vendor/reflexio/reflexio/server/site_var/site_var_sources/feature_flags.json +13 -0
- package/plugin/vendor/reflexio/reflexio/server/site_var/site_var_sources/llm_model_setting.json +7 -0
- package/plugin/vendor/reflexio/reflexio/server/tracing.py +158 -0
- package/plugin/vendor/reflexio/reflexio/server/usage_metrics.py +113 -0
- package/plugin/vendor/reflexio/reflexio/server/uvicorn_logging.py +76 -0
- package/plugin/vendor/reflexio/reflexio/test_support/__init__.py +1 -0
- package/plugin/vendor/reflexio/reflexio/test_support/llm_fixtures.py +62 -0
- package/plugin/vendor/reflexio/reflexio/test_support/llm_mock.py +242 -0
- package/plugin/vendor/reflexio/reflexio/test_support/llm_model_registry.py +129 -0
- package/plugin/vendor/reflexio/reflexio/test_support/skip_decorators.py +43 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
---
|
|
2
|
+
active: false
|
|
3
|
+
description: "System instruction for profile extraction (extraction-only, no delete/mention)"
|
|
4
|
+
changelog: "Extraction-only: removed delete/mention operations. Output format changed to {profiles: [...]}. Deduplication against existing profiles handled separately by ProfileDeduplicator."
|
|
5
|
+
variables:
|
|
6
|
+
- agent_context_prompt
|
|
7
|
+
- context_prompt
|
|
8
|
+
- extraction_definition_prompt
|
|
9
|
+
- metadata_definition_prompt
|
|
10
|
+
---
|
|
11
|
+
[Context of user interactions]
|
|
12
|
+
{agent_context_prompt}
|
|
13
|
+
{context_prompt}
|
|
14
|
+
|
|
15
|
+
[Goal]
|
|
16
|
+
You are a user personalization learning assistant.
|
|
17
|
+
Your job is to analyze user–agent interactions and extract **salient information about the user** that should shape how an AI agent communicates with and serves this user in future conversations.
|
|
18
|
+
|
|
19
|
+
A "profile" can be:
|
|
20
|
+
• **Factual information**: Direct facts about the user (name, birthday, occupation, location)
|
|
21
|
+
• **Work & expertise**: Professional role, technical skills, domain knowledge, tools used daily
|
|
22
|
+
• **Goals & projects**: Current objectives, ongoing projects, deadlines, milestones
|
|
23
|
+
• **Life circumstances**: Living situation, health considerations, family context, time constraints
|
|
24
|
+
• **Relationships & family**: Family members, pets, key people in their life
|
|
25
|
+
• **Domain / environment facts**: Stable facts about the user's working environment that the agent needs to know to serve them correctly — schema details (table names, column types, units of measurement), join paths, metric definitions the user enforces, tool quirks or limitations the user works around, file-format conventions, and similar reference knowledge. These are properties of the user's data or tooling, not of the agent's behavior.
|
|
26
|
+
• **Inferred personalization signals**: Patterns derived from behavior or multi-turn inference that would cause an agent to meaningfully change how it responds
|
|
27
|
+
|
|
28
|
+
Profiles may be extracted from:
|
|
29
|
+
• Explicit statements ("I prefer sushi")
|
|
30
|
+
• Implicit signals (implied preference/acceptance/rejection)
|
|
31
|
+
• Multi-turn inference (a stable pattern across multiple turns where the user never explicitly states a preference, but behavior suggests one)
|
|
32
|
+
|
|
33
|
+
**Scope boundary — what is NOT a profile:**
|
|
34
|
+
Profiles capture what is *true about the user or their world*. They do NOT capture
|
|
35
|
+
*what the agent should do differently next time*. If a learning is a behavioral
|
|
36
|
+
rule for the agent (e.g., "when the user asks about methodology, stop and propose
|
|
37
|
+
a corrected plan before re-running queries", "always explain root cause before
|
|
38
|
+
proposing code changes"), it belongs in the playbook extractor, not here. Extract
|
|
39
|
+
only the stable facts the agent needs to know; leave the action rules to playbooks.
|
|
40
|
+
|
|
41
|
+
[Your Task - Follow These Steps]
|
|
42
|
+
|
|
43
|
+
STEP 1: Analyze and reason through the user interactions below and compare them to existing profiles by the what to extract definition.
|
|
44
|
+
|
|
45
|
+
STEP 2: Decide what to extract:
|
|
46
|
+
- If the interaction reveals NEW information about the user that is NOT already stored in existing profiles → Extract it as a new profile
|
|
47
|
+
- If the information is already in existing profiles → Do NOT re-extract it
|
|
48
|
+
- If the interaction contains NO relevant profile information → Return empty result
|
|
49
|
+
|
|
50
|
+
STEP 3: For each profile you extract, you must assign:
|
|
51
|
+
- "content": The profile information (what you learned about the user)
|
|
52
|
+
- "time_to_live": How long this information stays valid (see rules below)
|
|
53
|
+
- "metadata": Extra categorization based on the metadata definition (only if metadata definition is provided)
|
|
54
|
+
|
|
55
|
+
[Time to Live - Choose One]
|
|
56
|
+
- "infinity" → Facts that rarely change (name, birthday, gender, phone number)
|
|
57
|
+
- "one_year" → Long-term preferences (favorite color, hobby)
|
|
58
|
+
- "one_quarter" → Seasonal preferences (winter activities, holiday traditions)
|
|
59
|
+
- "one_month" → Regular preferences (food preferences, UI preferences)
|
|
60
|
+
- "one_week" → Short-term or situational preferences (current project, temporary need)
|
|
61
|
+
|
|
62
|
+
[What to Extract - Definitions]
|
|
63
|
+
Only extract profiles that match this content definition: {extraction_definition_prompt}
|
|
64
|
+
|
|
65
|
+
Only extract metadata that matches this definition (if provided): {metadata_definition_prompt}
|
|
66
|
+
|
|
67
|
+
[Output Format]
|
|
68
|
+
Return a JSON object. If nothing to extract, return {{"profiles": null}}.
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{{
|
|
72
|
+
"profiles": [
|
|
73
|
+
{{
|
|
74
|
+
"content": "the new profile information",
|
|
75
|
+
"time_to_live": "such as one_month",
|
|
76
|
+
"metadata": "metadata value if definition provided"
|
|
77
|
+
}}
|
|
78
|
+
]
|
|
79
|
+
}}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
[Examples With Explanations]
|
|
83
|
+
|
|
84
|
+
Example 1 - Extracting a new profile:
|
|
85
|
+
- Content definition: "food preferences"
|
|
86
|
+
- Metadata definition: "cuisine type (pizza, sushi, pasta, salad, steak)"
|
|
87
|
+
- Existing profiles: []
|
|
88
|
+
- Interaction: "i like to eat pizza"
|
|
89
|
+
- Reasoning: User revealed a food preference. This is new (not in existing profiles). Food preference changes monthly, so time_to_live is "one_month".
|
|
90
|
+
```json
|
|
91
|
+
{{"profiles": [{{"content": "likes pizza", "time_to_live": "one_month", "metadata": "pizza"}}]}}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Example 2 - Extracting a permanent profile:
|
|
95
|
+
- Interaction: "my name is John"
|
|
96
|
+
- Reasoning: User's name is a permanent fact. Use "infinity" for time_to_live.
|
|
97
|
+
```json
|
|
98
|
+
{{"profiles": [{{"content": "name is John", "time_to_live": "infinity"}}]}}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Example 3 - Extracting work context and project:
|
|
102
|
+
- Content definition: "user information"
|
|
103
|
+
- Existing profiles: []
|
|
104
|
+
- Interaction: "I'm a senior backend engineer at Acme Corp, currently migrating our payment service from monolith to microservices. The deadline is end of Q2."
|
|
105
|
+
- Reasoning: Multiple salient facts: role, company, current project, and deadline.
|
|
106
|
+
```json
|
|
107
|
+
{{"profiles": [
|
|
108
|
+
{{"content": "senior backend engineer at Acme Corp", "time_to_live": "one_year"}},
|
|
109
|
+
{{"content": "migrating payment service from monolith to microservices with Q2 deadline", "time_to_live": "one_quarter"}}
|
|
110
|
+
]}}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Example 4 - No relevant information:
|
|
114
|
+
- Content definition: "food preferences"
|
|
115
|
+
- Interaction: "what time is it?"
|
|
116
|
+
- Reasoning: The interaction has nothing to do with food preferences. Return empty.
|
|
117
|
+
```json
|
|
118
|
+
{{"profiles": null}}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Example 5 - Domain / environment fact surfaced through error correction:
|
|
122
|
+
- Content definition: "user information and working environment"
|
|
123
|
+
- Existing profiles: []
|
|
124
|
+
- Interaction: Agent attempts `SUM(orders.total_amount)` and fails with "unknown column 'total_amount'". Runs `DESCRIBE orders` and discovers the column is actually `gross_cents`, stored as INTEGER in cents, not dollars. User confirms: "yes, gross_cents is in cents — you'll need to divide by 100 for dollar amounts."
|
|
125
|
+
- Reasoning: This is a stable fact about the user's data schema (table column name, type, unit) that the agent needs to know for any future revenue query. It's not a behavioral rule ("always run DESCRIBE first"); it's a property of the user's data. Store as a domain/environment fact with a long TTL (`one_year`) since schemas don't change often.
|
|
126
|
+
```json
|
|
127
|
+
{{"profiles": [
|
|
128
|
+
{{"content": "orders.gross_cents stores order revenue as INTEGER in cents (not dollars) — divide by 100 for dollar amounts", "time_to_live": "one_year"}}
|
|
129
|
+
]}}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Note: if the same session surfaces a behavioral rule (e.g., "verify column types with DESCRIBE before aggregating"), that rule belongs in the playbook extractor, not here. This example captures only the fact.
|
|
133
|
+
|
|
134
|
+
[Important Reminders]
|
|
135
|
+
1. Only extract profiles matching the content definition provided above
|
|
136
|
+
2. If the information is already in existing profiles, do NOT re-extract it
|
|
137
|
+
3. Always include time_to_live for new profiles
|
|
138
|
+
4. Only include metadata if a metadata definition is provided
|
|
139
|
+
5. **Forget / delete / remove requests.** When the user explicitly asks to forget, delete, or stop remembering a stored fact (e.g. "forget that I like X", "remove my interest in Y", "don't remember that I work at Z"), emit a single profile whose `content` begins with "Requested removal of" and names the topic in positive form. Do NOT rephrase the request as a new fact ("User is no longer interested in X", "User stopped caring about Y") — that looks like a fact update and will be merged into a zombie profile instead of erasing the original. The downstream deduplicator recognizes the "Requested removal of…" phrasing and uses it to delete the matching existing profile outright.
|
|
140
|
+
6. Return {{"profiles": null}} if there is nothing to extract
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
---
|
|
2
|
+
active: true
|
|
3
|
+
description: "System instruction for resumable profile extraction with optional pending-request attachment"
|
|
4
|
+
changelog: "v1.1.0: Adds resumable extraction guidance for finish_extraction and optional attach_pending_info_request while preserving the extraction-only profile output schema."
|
|
5
|
+
variables:
|
|
6
|
+
- agent_context_prompt
|
|
7
|
+
- context_prompt
|
|
8
|
+
- extraction_definition_prompt
|
|
9
|
+
- metadata_definition_prompt
|
|
10
|
+
---
|
|
11
|
+
[Context of user interactions]
|
|
12
|
+
{agent_context_prompt}
|
|
13
|
+
{context_prompt}
|
|
14
|
+
|
|
15
|
+
[Goal]
|
|
16
|
+
You are a user personalization learning assistant.
|
|
17
|
+
Your job is to analyze user–agent interactions and extract **salient information about the user** that should shape how an AI agent communicates with and serves this user in future conversations.
|
|
18
|
+
|
|
19
|
+
[Resumable Extraction Mode]
|
|
20
|
+
When tool calling is available, **`finish_extraction` is the only *required* tool — you must always end the run by calling it.**
|
|
21
|
+
|
|
22
|
+
• `attach_pending_info_request` — optional. When Prior Knowledge already lists a relevant pending request, and you are confident this run should resume when that request is answered, attach this run to it by reusing its `pending_tool_call_id`.
|
|
23
|
+
|
|
24
|
+
Attachment is **non-blocking**: after calling it, keep extracting and still call `finish_extraction` now with the profiles you can extract. Use resolved feedback or Prior Knowledge only when relevant to the current window.
|
|
25
|
+
|
|
26
|
+
A "profile" can be:
|
|
27
|
+
• **Factual information**: Direct facts about the user (name, birthday, occupation, location)
|
|
28
|
+
• **Work & expertise**: Professional role, technical skills, domain knowledge, tools used daily
|
|
29
|
+
• **Goals & projects**: Current objectives, ongoing projects, deadlines, milestones
|
|
30
|
+
• **Life circumstances**: Living situation, health considerations, family context, time constraints
|
|
31
|
+
• **Relationships & family**: Family members, pets, key people in their life
|
|
32
|
+
• **Domain / environment facts**: Stable facts about the user's working environment that the agent needs to know to serve them correctly — schema details (table names, column types, units of measurement), join paths, metric definitions the user enforces, tool quirks or limitations the user works around, file-format conventions, and similar reference knowledge. These are properties of the user's data or tooling, not of the agent's behavior.
|
|
33
|
+
• **Inferred personalization signals**: Patterns derived from behavior or multi-turn inference that would cause an agent to meaningfully change how it responds
|
|
34
|
+
|
|
35
|
+
Profiles may be extracted from:
|
|
36
|
+
• Explicit statements ("I prefer sushi")
|
|
37
|
+
• Implicit signals (implied preference/acceptance/rejection)
|
|
38
|
+
• Multi-turn inference (a stable pattern across multiple turns where the user never explicitly states a preference, but behavior suggests one)
|
|
39
|
+
|
|
40
|
+
**Scope boundary — what is NOT a profile:**
|
|
41
|
+
Profiles capture what is *true about the user or their world*. They do NOT capture
|
|
42
|
+
*what the agent should do differently next time*. If a learning is a behavioral
|
|
43
|
+
rule for the agent (e.g., "when the user asks about methodology, stop and propose
|
|
44
|
+
a corrected plan before re-running queries", "always explain root cause before
|
|
45
|
+
proposing code changes"), it belongs in the playbook extractor, not here. Extract
|
|
46
|
+
only the stable facts the agent needs to know; leave the action rules to playbooks.
|
|
47
|
+
|
|
48
|
+
[Your Task - Follow These Steps]
|
|
49
|
+
|
|
50
|
+
STEP 1: Analyze and reason through the user interactions below and compare them to existing profiles by the what to extract definition.
|
|
51
|
+
|
|
52
|
+
STEP 2: Decide what to extract:
|
|
53
|
+
- If the interaction reveals NEW information about the user that is NOT already stored in existing profiles → Extract it as a new profile
|
|
54
|
+
- If the information is already in existing profiles → Do NOT re-extract it
|
|
55
|
+
- If the interaction contains NO relevant profile information → Return empty result
|
|
56
|
+
|
|
57
|
+
STEP 3: For each profile you extract, you must assign:
|
|
58
|
+
- "content": The profile information (what you learned about the user)
|
|
59
|
+
- "time_to_live": How long this information stays valid (see rules below)
|
|
60
|
+
- "metadata": Extra categorization based on the metadata definition (only if metadata definition is provided)
|
|
61
|
+
|
|
62
|
+
[Time to Live - Choose One]
|
|
63
|
+
- "infinity" → Facts that rarely change (name, birthday, gender, phone number)
|
|
64
|
+
- "one_year" → Long-term preferences (favorite color, hobby)
|
|
65
|
+
- "one_quarter" → Seasonal preferences (winter activities, holiday traditions)
|
|
66
|
+
- "one_month" → Regular preferences (food preferences, UI preferences)
|
|
67
|
+
- "one_week" → Short-term or situational preferences (current project, temporary need)
|
|
68
|
+
|
|
69
|
+
[What to Extract - Definitions]
|
|
70
|
+
Only extract profiles that match this content definition: {extraction_definition_prompt}
|
|
71
|
+
|
|
72
|
+
Only extract metadata that matches this definition (if provided): {metadata_definition_prompt}
|
|
73
|
+
|
|
74
|
+
[Output Format]
|
|
75
|
+
Report your result by calling the `finish_extraction` tool with a single JSON argument of the shape below. Put the JSON in the tool call — do not write it as a plain-text reply. If there is nothing to extract, call `finish_extraction` with {{"profiles": null}}.
|
|
76
|
+
|
|
77
|
+
In the rare case described under Resumable Extraction Mode above, you may call `attach_pending_info_request` before `finish_extraction`; it is non-blocking, so always still call `finish_extraction` (see Example 6).
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
{{
|
|
81
|
+
"profiles": [
|
|
82
|
+
{{
|
|
83
|
+
"content": "the new profile information",
|
|
84
|
+
"time_to_live": "such as one_month",
|
|
85
|
+
"metadata": "metadata value if definition provided"
|
|
86
|
+
}}
|
|
87
|
+
]
|
|
88
|
+
}}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
[Examples With Explanations]
|
|
92
|
+
In each example, the JSON shown is the argument you pass to `finish_extraction` — not text to print.
|
|
93
|
+
|
|
94
|
+
Example 1 - Extracting a new profile:
|
|
95
|
+
- Content definition: "food preferences"
|
|
96
|
+
- Metadata definition: "cuisine type (pizza, sushi, pasta, salad, steak)"
|
|
97
|
+
- Existing profiles: []
|
|
98
|
+
- Interaction: "i like to eat pizza"
|
|
99
|
+
- Reasoning: User revealed a food preference. This is new (not in existing profiles). Food preference changes monthly, so time_to_live is "one_month".
|
|
100
|
+
```json
|
|
101
|
+
{{"profiles": [{{"content": "likes pizza", "time_to_live": "one_month", "metadata": "pizza"}}]}}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Example 2 - Extracting a permanent profile:
|
|
105
|
+
- Interaction: "my name is John"
|
|
106
|
+
- Reasoning: User's name is a permanent fact. Use "infinity" for time_to_live.
|
|
107
|
+
```json
|
|
108
|
+
{{"profiles": [{{"content": "name is John", "time_to_live": "infinity"}}]}}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Example 3 - Extracting work context and project:
|
|
112
|
+
- Content definition: "user information"
|
|
113
|
+
- Existing profiles: []
|
|
114
|
+
- Interaction: "I'm a senior backend engineer at Acme Corp, currently migrating our payment service from monolith to microservices. The deadline is end of Q2."
|
|
115
|
+
- Reasoning: Multiple salient facts: role, company, current project, and deadline.
|
|
116
|
+
```json
|
|
117
|
+
{{"profiles": [
|
|
118
|
+
{{"content": "senior backend engineer at Acme Corp", "time_to_live": "one_year"}},
|
|
119
|
+
{{"content": "migrating payment service from monolith to microservices with Q2 deadline", "time_to_live": "one_quarter"}}
|
|
120
|
+
]}}
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Example 4 - No relevant information:
|
|
124
|
+
- Content definition: "food preferences"
|
|
125
|
+
- Interaction: "what time is it?"
|
|
126
|
+
- Reasoning: The interaction has nothing to do with food preferences. Return empty.
|
|
127
|
+
```json
|
|
128
|
+
{{"profiles": null}}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Example 5 - Domain / environment fact surfaced through error correction:
|
|
132
|
+
- Content definition: "user information and working environment"
|
|
133
|
+
- Existing profiles: []
|
|
134
|
+
- Interaction: Agent attempts `SUM(orders.total_amount)` and fails with "unknown column 'total_amount'". Runs `DESCRIBE orders` and discovers the column is actually `gross_cents`, stored as INTEGER in cents, not dollars. User confirms: "yes, gross_cents is in cents — you'll need to divide by 100 for dollar amounts."
|
|
135
|
+
- Reasoning: This is a stable fact about the user's data schema (table column name, type, unit) that the agent needs to know for any future revenue query. It's not a behavioral rule ("always run DESCRIBE first"); it's a property of the user's data. Store as a domain/environment fact with a long TTL (`one_year`) since schemas don't change often.
|
|
136
|
+
```json
|
|
137
|
+
{{"profiles": [
|
|
138
|
+
{{"content": "orders.gross_cents stores order revenue as INTEGER in cents (not dollars) — divide by 100 for dollar amounts", "time_to_live": "one_year"}}
|
|
139
|
+
]}}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Note: if the same session surfaces a behavioral rule (e.g., "verify column types with DESCRIBE before aggregating"), that rule belongs in the playbook extractor, not here. This example captures only the fact.
|
|
143
|
+
|
|
144
|
+
Example 6 - `attach_pending_info_request` when the question is already pending, then finish:
|
|
145
|
+
- Interaction: User: "my name is jack — please remember the canonical deployment target for my service. There's an internal standard, but I'm not stating it here."
|
|
146
|
+
- Prior Knowledge contains `pending_tool_call_id: ptc_7f3a91` for the canonical deployment target.
|
|
147
|
+
- Reasoning: Extract "name is jack" now. The canonical deployment target is missing and cannot be derived. Because Prior Knowledge already lists the exact pending question, attach to it so the run resumes when answered. Only pass a `pending_tool_call_id` that appears verbatim in Prior Knowledge.
|
|
148
|
+
- Call `attach_pending_info_request`, then `finish_extraction`:
|
|
149
|
+
```json
|
|
150
|
+
{{"pending_tool_call_id": "ptc_7f3a91", "why_relevant": "Same org deployment standard the user wants stored; resume when answered."}}
|
|
151
|
+
{{"profiles": [{{"content": "name is jack", "time_to_live": "infinity"}}]}}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
[Important Reminders]
|
|
155
|
+
1. Only extract profiles matching the content definition provided above
|
|
156
|
+
2. If the information is already in existing profiles, do NOT re-extract it
|
|
157
|
+
3. Always include time_to_live for new profiles
|
|
158
|
+
4. Only include metadata if a metadata definition is provided
|
|
159
|
+
5. **Forget / delete / remove requests.** When the user explicitly asks to forget, delete, or stop remembering a stored fact (e.g. "forget that I like X", "remove my interest in Y", "don't remember that I work at Z"), emit a single profile whose `content` begins with "Requested removal of" and names the topic in positive form. Do NOT rephrase the request as a new fact ("User is no longer interested in X", "User stopped caring about Y") — that looks like a fact update and will be merged into a zombie profile instead of erasing the original. The downstream deduplicator recognizes the "Requested removal of…" phrasing and uses it to delete the matching existing profile outright.
|
|
160
|
+
6. Call `finish_extraction` with {{"profiles": null}} if there is nothing to extract
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
active: true
|
|
3
|
+
description: "Main user prompt for profile extraction with existing profiles for context"
|
|
4
|
+
changelog: "Clarified existing profiles are for context only (do NOT re-extract). Aligned with extraction-only flow."
|
|
5
|
+
variables:
|
|
6
|
+
- existing_profiles
|
|
7
|
+
- interactions
|
|
8
|
+
---
|
|
9
|
+
[Existing Profiles]
|
|
10
|
+
These profiles are already stored for this user (for context — do NOT re-extract these):
|
|
11
|
+
[{existing_profiles}]
|
|
12
|
+
|
|
13
|
+
[User Interactions to Analyze]
|
|
14
|
+
{interactions}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
active: true
|
|
3
|
+
description: "Reformulates a user search query into clean, standalone natural language"
|
|
4
|
+
variables:
|
|
5
|
+
- query
|
|
6
|
+
- conversation_context_block
|
|
7
|
+
---
|
|
8
|
+
Reformulate the user's search query into a clean, standalone natural language query.
|
|
9
|
+
Resolve any pronouns, ellipsis, or implicit references from conversation context.
|
|
10
|
+
Expand abbreviations, fix grammar, and normalize terminology.
|
|
11
|
+
Do NOT add FTS syntax, OR operators, or synonym expansion -- just produce clean natural language.
|
|
12
|
+
When conversation context is provided, extract the core problem from the full conversation -- the user's latest query alone may be vague (e.g., "help"), but earlier turns could contain the real issue.
|
|
13
|
+
{conversation_context_block}
|
|
14
|
+
Examples:
|
|
15
|
+
"agent failed to refund" → agent failed to process refund
|
|
16
|
+
Context: [user]: backup failing [user]: S3 timeout 900s | Query: "help" → backup failure with S3 timeout
|
|
17
|
+
|
|
18
|
+
Output ONLY the reformulated query, nothing else.
|
|
19
|
+
Query: {query}
|
package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/rerank_relevance/v1.1.0.prompt.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
active: true
|
|
3
|
+
description: "LLM-as-reranker — scores retrieved profiles for query relevance using world knowledge. Bridges brand→category and tool→use-case gaps that lexical-semantic rerankers miss."
|
|
4
|
+
variables:
|
|
5
|
+
- query
|
|
6
|
+
- docs_block
|
|
7
|
+
- num_docs
|
|
8
|
+
---
|
|
9
|
+
You are a relevance judge for a memory-search system. Score each candidate fact 0-10 for how relevant it is to answering the query.
|
|
10
|
+
|
|
11
|
+
## Use world knowledge
|
|
12
|
+
|
|
13
|
+
Recognize semantic equivalence that pure lexical matching misses. Patterns:
|
|
14
|
+
- **Brand → category**: a specific store/product/manufacturer name maps to its broader category (a grocery store chain → "grocery", a luxury car maker → "luxury cars", a wearable-tech maker → "fitness device", a streaming-service brand → "streaming subscription"). Score profiles by category membership even when only the brand is named.
|
|
15
|
+
- **Tool → use-case**: a tool/app/card name maps to what the tool DOES (a transit-card brand → "public-transit / getting around city X", a travel-organizer app → "travel itineraries / navigation", a note-taking app → "note-taking / organization", a workout-tracker app → "fitness tracking"). The query may name the use-case while the profile names the tool — score them as relevant.
|
|
16
|
+
- **Action synonyms**: "purchased" = "bought" = "got"; "favorite" = "preferred" = "love most"; "completed" = "finished" = "done with"; "doctor" = "physician" = "MD".
|
|
17
|
+
- **Topic ↔ instance**: a query about a category ("books I read", "movies I watched", "trips I took") matches profiles naming specific instances.
|
|
18
|
+
|
|
19
|
+
## Scoring rubric
|
|
20
|
+
|
|
21
|
+
- **10** — directly answers the query (states the fact the query asks about).
|
|
22
|
+
- **7-9** — strong evidence, perhaps requires light inference (brand→category, tool→use-case, near-synonym). **A user-owned tool, card, app, or service whose function maps to the query's activity is 7-9, not 3** — even if the profile content doesn't share keywords with the query.
|
|
23
|
+
- **4-6** — topical but doesn't answer (related entity but different facet).
|
|
24
|
+
- **1-3** — tangentially related (same general domain, different topic).
|
|
25
|
+
- **0** — unrelated.
|
|
26
|
+
|
|
27
|
+
## Important
|
|
28
|
+
|
|
29
|
+
- Treat brand/proper-noun mentions as **strong** evidence when the query asks about a category that the brand belongs to.
|
|
30
|
+
- For "help / tips / anxious about / what should I do" questions, the user's stored **tools, cards, apps, services, and named preparations** are usually the answer's anchor — score them 7-9, not 1-3. Generic preference statements (e.g. `user enjoys <CATEGORY>`) are weaker than specific resource ownership (e.g. `user has a <RESOURCE>`, `user downloaded <APP>`) because the resource's affordance is what makes the tip personalised.
|
|
31
|
+
- Do NOT penalize a fact for missing the literal query keyword if the meaning matches.
|
|
32
|
+
- Do NOT score based on date recency or correctness — only relevance to the query topic.
|
|
33
|
+
|
|
34
|
+
## Query
|
|
35
|
+
|
|
36
|
+
{query}
|
|
37
|
+
|
|
38
|
+
## Candidate facts (numbered)
|
|
39
|
+
|
|
40
|
+
{docs_block}
|
|
41
|
+
|
|
42
|
+
## Output
|
|
43
|
+
|
|
44
|
+
Output ONLY a JSON array of {num_docs} numbers (each 0-10) in the same order as the candidates above. No prose, no keys, no explanation. Example for 3 candidates: `[8, 2, 10]`.
|
package/plugin/vendor/reflexio/reflexio/server/prompt/prompt_bank/shadow_comparison/v1.0.0.prompt.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
active: true
|
|
3
|
+
description: "F1 per-turn comparison of two candidate AI responses against the same user message"
|
|
4
|
+
variables:
|
|
5
|
+
- user_message
|
|
6
|
+
- request_1_response
|
|
7
|
+
- request_2_response
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
You are evaluating two candidate AI assistant responses to the same user
|
|
11
|
+
message. Determine which response is better, or if they are roughly
|
|
12
|
+
equivalent.
|
|
13
|
+
|
|
14
|
+
Judgment criteria, in order of importance:
|
|
15
|
+
1. Correctness — does the response accurately answer the user's question?
|
|
16
|
+
2. Completeness — does the response cover what the user actually needs?
|
|
17
|
+
3. Actionability — does it give the user a clear next step where applicable?
|
|
18
|
+
4. Style and format — clarity, concision, structure.
|
|
19
|
+
|
|
20
|
+
Important constraints:
|
|
21
|
+
- Judge only on these two responses and the user message below. Do NOT
|
|
22
|
+
assume any prior conversation history exists or invent context.
|
|
23
|
+
- Length does not equal quality. A shorter response that fully answers
|
|
24
|
+
is better than a longer one that meanders.
|
|
25
|
+
- Position (Request 1 vs Request 2) is arbitrary — the labels do not
|
|
26
|
+
encode any prior knowledge. Evaluate purely on content.
|
|
27
|
+
|
|
28
|
+
USER MESSAGE
|
|
29
|
+
------------
|
|
30
|
+
{user_message}
|
|
31
|
+
|
|
32
|
+
REQUEST 1
|
|
33
|
+
---------
|
|
34
|
+
{request_1_response}
|
|
35
|
+
|
|
36
|
+
REQUEST 2
|
|
37
|
+
---------
|
|
38
|
+
{request_2_response}
|
|
39
|
+
|
|
40
|
+
Output a JSON object with exactly these fields:
|
|
41
|
+
better_request: "1" | "2" | "tie"
|
|
42
|
+
is_significantly_better: true | false (false ↔ "they're close but 1/2 edges it")
|
|
43
|
+
comparison_reason: 1-2 sentences explaining the choice.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
active: false
|
|
3
|
+
description: "DEPRECATED — session-level shadow comparison. Replaced by per-turn shadow_comparison prompt (F1). Kept as historical record so any v1.0.0 verdicts produced under this prompt can still be located in audit logs."
|
|
4
|
+
variables:
|
|
5
|
+
- agent_context_prompt
|
|
6
|
+
- success_definition_prompt
|
|
7
|
+
- tool_can_use
|
|
8
|
+
- metadata_definition_prompt
|
|
9
|
+
- interactions
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
[Instruction]
|
|
13
|
+
Given the interactions below, compare the response 1 and response 2 and determine which one is better based on the context and success definition.
|
|
14
|
+
|
|
15
|
+
[Context]
|
|
16
|
+
{agent_context_prompt}
|
|
17
|
+
|
|
18
|
+
[Success definition]
|
|
19
|
+
{success_definition_prompt}
|
|
20
|
+
|
|
21
|
+
[Interactions]
|
|
22
|
+
User and agent interactions:
|
|
23
|
+
{interactions}
|
|
24
|
+
|
|
25
|
+
[Output]
|
|
26
|
+
Determine which response is better or tie and output the id of the better response or tie if they are similar.
|
|
27
|
+
Generate the output in the following JSON schema
|
|
28
|
+
#
|
|
29
|
+
```
|
|
30
|
+
{{
|
|
31
|
+
'better_response': "1 or 2 or tie",
|
|
32
|
+
}}
|
|
33
|
+
```
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{"test_id": "positive_product_feedback", "description": "Extract positive feedback about product features", "interactions": [{"role": "user", "content": "I absolutely love the new dashboard design! It's so much cleaner and easier to navigate.", "user_action": "none", "user_action_description": "", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123456}, {"role": "user", "content": "The search functionality is incredibly fast now, great improvement!", "user_action": "none", "user_action_description": "", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123457}], "agent_context_prompt": "Extract user feedback from interactions", "feedback_definition_prompt": "product usability feedback, feature satisfaction, and overall user sentiment", "expected_label": "The user provides highly positive feedback about the dashboard redesign, specifically praising its clean design and improved navigation. They also express satisfaction with the enhanced search functionality speed, indicating strong approval of recent product improvements."}
|
|
2
|
+
{"test_id": "negative_performance_feedback", "description": "Extract negative feedback about system performance", "interactions": [{"role": "user", "content": "The app keeps crashing when I try to upload large files", "user_action": "none", "user_action_description": "", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123456}, {"role": "user", "content": "This is really frustrating, it's been happening for weeks now", "user_action": "none", "user_action_description": "", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123457}], "agent_context_prompt": "Extract user feedback from interactions", "feedback_definition_prompt": "technical problems, system reliability issues, and user frustration levels", "expected_label": "The user reports consistent application crashes during large file uploads, expressing significant frustration with the ongoing technical issue that has persisted for weeks, indicating poor system reliability and negative user experience."}
|
|
3
|
+
{"test_id": "mixed_ui_feedback", "description": "Extract mixed feedback about user interface changes", "interactions": [{"role": "user", "content": "The new color scheme looks nice, but I'm having trouble finding the settings menu", "user_action": "click", "user_action_description": "clicked on various menu items", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123456}, {"role": "user", "content": "I like the visual improvements but the navigation feels confusing now", "user_action": "none", "user_action_description": "", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123457}], "agent_context_prompt": "Extract user feedback from interactions", "feedback_definition_prompt": "visual design feedback, navigation usability, and user interface experience", "expected_label": "The user provides mixed feedback on UI changes, expressing appreciation for the new color scheme and visual improvements while simultaneously reporting navigation difficulties and confusion in finding the settings menu, indicating a trade-off between aesthetics and usability."}
|
|
4
|
+
{"test_id": "feature_request_feedback", "description": "Extract feedback containing feature requests", "interactions": [{"role": "user", "content": "It would be great if you could add dark mode support", "user_action": "none", "user_action_description": "", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123456}, {"role": "user", "content": "Also, I think keyboard shortcuts would make the workflow much faster", "user_action": "none", "user_action_description": "", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123457}], "agent_context_prompt": "Extract user feedback from interactions", "feedback_definition_prompt": "feature requests, workflow improvements, and user enhancement suggestions", "expected_label": "The user suggests two specific feature enhancements: dark mode support for better visual comfort and keyboard shortcuts for improved workflow efficiency, indicating engaged user interest in product improvement and productivity optimization."}
|
|
5
|
+
{"test_id": "support_experience_feedback", "description": "Extract feedback about customer support experience", "interactions": [{"role": "user", "content": "Thank you for the quick response to my ticket!", "user_action": "none", "user_action_description": "", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123456}, {"role": "user", "content": "The support agent was very helpful and solved my problem within minutes", "user_action": "none", "user_action_description": "", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123457}], "agent_context_prompt": "Extract user feedback from interactions", "feedback_definition_prompt": "support quality, response time satisfaction, and customer service experience", "expected_label": "The user expresses high satisfaction with customer support, specifically praising the quick response time and the helpfulness of the support agent who efficiently resolved their issue within minutes, indicating excellent customer service experience."}
|
|
6
|
+
{"test_id": "pricing_concern_feedback", "description": "Extract feedback about pricing and value concerns", "interactions": [{"role": "user", "content": "The premium features are nice, but the subscription cost seems quite high", "user_action": "none", "user_action_description": "", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123456}, {"role": "user", "content": "I'm not sure if I'm getting enough value for what I'm paying", "user_action": "none", "user_action_description": "", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123457}], "agent_context_prompt": "Extract user feedback from interactions", "feedback_definition_prompt": "pricing concerns, value perception, and subscription satisfaction", "expected_label": "The user expresses concern about the premium subscription cost, acknowledging the quality of premium features while questioning the value proposition and expressing uncertainty about whether the benefits justify the current pricing structure."}
|
|
7
|
+
{"test_id": "accessibility_feedback", "description": "Extract feedback about accessibility and inclusive design", "interactions": [{"role": "user", "content": "I appreciate that you added screen reader support, it makes a huge difference", "user_action": "none", "user_action_description": "", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123456}, {"role": "user", "content": "However, some text is still too small to read comfortably even with zoom", "user_action": "scroll", "user_action_description": "scrolled to find readable text", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123457}], "agent_context_prompt": "Extract user feedback from interactions", "feedback_definition_prompt": "accessibility features, inclusive design elements, and usability barriers", "expected_label": "The user provides constructive accessibility feedback, expressing gratitude for screen reader support implementation while identifying remaining barriers with text size readability, even when using zoom features, indicating continued need for accessibility improvements."}
|
|
8
|
+
{"test_id": "workflow_efficiency_feedback", "description": "Extract feedback about workflow and productivity", "interactions": [{"role": "user", "content": "The new batch processing feature has saved me hours of work each week", "user_action": "none", "user_action_description": "", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123456}, {"role": "user", "content": "I can now process hundreds of documents at once instead of doing them individually", "user_action": "none", "user_action_description": "", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123457}], "agent_context_prompt": "Extract user feedback from interactions", "feedback_definition_prompt": "workflow efficiency, productivity improvements, and feature impact on daily tasks", "expected_label": "The user reports significant productivity gains from the new batch processing feature, quantifying time savings of hours per week and highlighting the ability to process hundreds of documents simultaneously, indicating substantial positive impact on workflow efficiency."}
|
|
9
|
+
{"test_id": "bug_report_feedback", "description": "Extract feedback containing bug reports and technical issues", "interactions": [{"role": "user", "content": "I found a bug where the save button doesn't work on mobile devices", "user_action": "click", "user_action_description": "attempted to click save button multiple times", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123456}, {"role": "user", "content": "This happens specifically on iPhone Safari, works fine on desktop Chrome", "user_action": "none", "user_action_description": "", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123457}], "agent_context_prompt": "Extract user feedback from interactions", "feedback_definition_prompt": "technical bugs, device-specific issues, and system compatibility problems", "expected_label": "The user reports a device-specific bug affecting the save button functionality on iPhone Safari while noting that the same feature works correctly on desktop Chrome, providing detailed technical context for troubleshooting and cross-platform compatibility issues."}
|
|
10
|
+
{"test_id": "onboarding_experience_feedback", "description": "Extract feedback about user onboarding and initial experience", "interactions": [{"role": "user", "content": "The getting started tutorial was really helpful for new users like me", "user_action": "none", "user_action_description": "", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123456}, {"role": "user", "content": "I was up and running within 10 minutes, which is impressive for such a complex tool", "user_action": "none", "user_action_description": "", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123457}], "agent_context_prompt": "Extract user feedback from interactions", "feedback_definition_prompt": "onboarding effectiveness, learning curve, and initial user satisfaction", "expected_label": "The user provides positive feedback about the onboarding experience, praising the tutorial's helpfulness for new users and expressing satisfaction with the quick setup time of 10 minutes despite the tool's complexity, indicating effective user onboarding design."}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{"test_id": "food_preferences_basic", "description": "Extract food preferences from simple user interaction", "interactions": [{"role": "user", "content": "I love Italian food, especially pasta carbonara and margherita pizza", "user_action": "none", "user_action_description": "", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123456}], "existing_profiles": [], "agent_context_prompt": "Extract user profiles from interactions", "context_prompt": "Analyze the following user interactions to extract relevant user profile information", "profile_content_definition_prompt": "food preferences and dietary choices", "metadata_definition_prompt": "cuisine type from: italian, japanese, mexican, american, indian, chinese", "expected_label": "{\"add\": [{\"content\": \"loves Italian food, especially pasta carbonara and margherita pizza\", \"time_to_live\": \"one_month\", \"metadata\": \"italian\"}]}"}
|
|
2
|
+
{"test_id": "food_preferences_multiple", "description": "Extract multiple food preferences from user interactions", "interactions": [{"role": "user", "content": "I love Italian food, especially pasta carbonara", "user_action": "none", "user_action_description": "", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123456}, {"role": "user", "content": "I'm also a big fan of sushi, particularly salmon and tuna rolls", "user_action": "none", "user_action_description": "", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123457}], "existing_profiles": [{"profile_content": "likes Mexican food", "metadata": "cuisine:mexican", "created_timestamp": 1703120000, "last_modified_timestamp": 1703120000}], "agent_context_prompt": "Extract user profiles from interactions", "context_prompt": "Analyze the following user interactions", "profile_content_definition_prompt": "food preferences and dietary choices", "metadata_definition_prompt": "cuisine type from: italian, japanese, mexican, american, indian, chinese", "expected_label": "{\"add\": [{\"content\": \"loves Italian food, especially pasta carbonara\", \"time_to_live\": \"one_month\", \"metadata\": \"italian\"}, {\"content\": \"enjoys sushi, particularly salmon and tuna rolls\", \"time_to_live\": \"one_month\", \"metadata\": \"japanese\"}]}"}
|
|
3
|
+
{"test_id": "hobbies_learning", "description": "Extract hobbies and learning activities", "interactions": [{"role": "user", "content": "I've been learning to play guitar for the past few months", "user_action": "none", "user_action_description": "", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123456}, {"role": "user", "content": "I also enjoy reading sci-fi novels in my free time", "user_action": "click", "user_action_description": "clicked on book recommendation", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123457}], "existing_profiles": [], "agent_context_prompt": "Extract user profiles from interactions", "context_prompt": "Analyze the following user interactions to extract relevant user profile information", "profile_content_definition_prompt": "hobbies and personal interests", "metadata_definition_prompt": "category from: music, reading, sports, art, technology, cooking", "expected_label": "{\"add\": [{\"content\": \"learning to play guitar\", \"time_to_live\": \"one_year\", \"metadata\": \"music\"}, {\"content\": \"enjoys reading sci-fi novels\", \"time_to_live\": \"one_year\", \"metadata\": \"reading\"}]}"}
|
|
4
|
+
{"test_id": "professional_skills", "description": "Extract professional skills and expertise", "interactions": [{"role": "user", "content": "I work as a software engineer specializing in Python and JavaScript", "user_action": "none", "user_action_description": "", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123456}, {"role": "user", "content": "I've recently been learning machine learning and AI development", "user_action": "none", "user_action_description": "", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123457}], "existing_profiles": [{"profile_content": "knows Java programming", "metadata": "skill_level:intermediate", "created_timestamp": 1703120000, "last_modified_timestamp": 1703120000}], "agent_context_prompt": "Extract user profiles from interactions", "context_prompt": "Analyze the following user interactions", "profile_content_definition_prompt": "professional skills and technical expertise", "metadata_definition_prompt": "skill level from: beginner, intermediate, advanced, expert", "expected_label": "{\"add\": [{\"content\": \"software engineer specializing in Python and JavaScript\", \"time_to_live\": \"infinity\", \"metadata\": \"expert\"}, {\"content\": \"learning machine learning and AI development\", \"time_to_live\": \"one_year\", \"metadata\": \"beginner\"}]}"}
|
|
5
|
+
{"test_id": "travel_preferences", "description": "Extract travel and vacation preferences", "interactions": [{"role": "user", "content": "I prefer beach vacations over mountain trips", "user_action": "none", "user_action_description": "", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123456}, {"role": "user", "content": "My dream destination is the Maldives for the crystal clear water", "user_action": "none", "user_action_description": "", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123457}], "existing_profiles": [], "agent_context_prompt": "Extract user profiles from interactions", "context_prompt": "Analyze the following user interactions", "profile_content_definition_prompt": "travel preferences and vacation interests", "metadata_definition_prompt": "travel type from: beach, mountain, city, adventure, cultural, relaxation", "expected_label": "{\"add\": [{\"content\": \"prefers beach vacations over mountain trips\", \"time_to_live\": \"one_year\", \"metadata\": \"beach\"}, {\"content\": \"dream destination is the Maldives for crystal clear water\", \"time_to_live\": \"one_year\", \"metadata\": \"beach\"}]}"}
|
|
6
|
+
{"test_id": "profile_deletion", "description": "Delete existing profile when preferences change", "interactions": [{"role": "user", "content": "I actually don't like spicy food anymore, my taste has changed", "user_action": "none", "user_action_description": "", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123456}], "existing_profiles": [{"profile_content": "loves spicy food", "metadata": "spice_level:high", "created_timestamp": 1703120000, "last_modified_timestamp": 1703120000}, {"profile_content": "enjoys mild curry", "metadata": "cuisine:indian", "created_timestamp": 1703120000, "last_modified_timestamp": 1703120000}], "agent_context_prompt": "Extract user profiles from interactions", "context_prompt": "Analyze the following user interactions", "profile_content_definition_prompt": "food preferences and dietary choices", "metadata_definition_prompt": "spice level from: none, mild, medium, high", "expected_label": "{\"delete\": [\"loves spicy food\"]}"}
|
|
7
|
+
{"test_id": "fitness_activities", "description": "Extract fitness and exercise habits", "interactions": [{"role": "user", "content": "I go to the gym 5 times a week and focus on strength training", "user_action": "none", "user_action_description": "", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123456}, {"role": "user", "content": "I also do yoga on weekends for flexibility and relaxation", "user_action": "none", "user_action_description": "", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123457}], "existing_profiles": [{"profile_content": "enjoys running", "metadata": "activity:cardio", "created_timestamp": 1703120000, "last_modified_timestamp": 1703120000}], "agent_context_prompt": "Extract fitness and health related activities", "context_prompt": "Analyze fitness habits and exercise preferences", "profile_content_definition_prompt": "fitness activities and exercise habits", "metadata_definition_prompt": "activity type from: cardio, strength, flexibility, sports, outdoor", "expected_label": "{\"add\": [{\"content\": \"goes to gym 5 times a week focusing on strength training\", \"time_to_live\": \"one_year\", \"metadata\": \"strength\"}, {\"content\": \"does yoga on weekends for flexibility and relaxation\", \"time_to_live\": \"one_year\", \"metadata\": \"flexibility\"}]}"}
|
|
8
|
+
{"test_id": "shopping_preferences", "description": "Extract shopping habits and brand preferences", "interactions": [{"role": "user", "content": "I always buy organic products when grocery shopping", "user_action": "none", "user_action_description": "", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123456}, {"role": "user", "content": "I prefer shopping at local farmers markets over big chain stores", "user_action": "click", "user_action_description": "clicked on farmers market link", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123457}], "existing_profiles": [], "agent_context_prompt": "Extract user profiles from interactions", "context_prompt": "Analyze the following user interactions", "profile_content_definition_prompt": "shopping habits and brand preferences", "metadata_definition_prompt": "shopping type from: organic, budget, luxury, local, online, brand_loyal", "expected_label": "{\"add\": [{\"content\": \"always buys organic products when grocery shopping\", \"time_to_live\": \"one_year\", \"metadata\": \"organic\"}, {\"content\": \"prefers shopping at local farmers markets over big chain stores\", \"time_to_live\": \"one_year\", \"metadata\": \"local\"}]}"}
|
|
9
|
+
{"test_id": "entertainment_preferences", "description": "Extract entertainment and media consumption preferences", "interactions": [{"role": "user", "content": "I love watching documentaries about nature and wildlife", "user_action": "none", "user_action_description": "", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123456}, {"role": "user", "content": "Netflix is my go-to platform for streaming", "user_action": "none", "user_action_description": "", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123457}], "existing_profiles": [{"profile_content": "enjoys comedy movies", "metadata": "genre:comedy", "created_timestamp": 1703120000, "last_modified_timestamp": 1703120000}], "agent_context_prompt": "Extract user profiles from interactions", "context_prompt": "Analyze the following user interactions", "profile_content_definition_prompt": "entertainment and media consumption preferences", "metadata_definition_prompt": "content type from: documentary, comedy, drama, action, horror, educational", "expected_label": "{\"add\": [{\"content\": \"loves watching documentaries about nature and wildlife\", \"time_to_live\": \"one_year\", \"metadata\": \"documentary\"}, {\"content\": \"uses Netflix as primary streaming platform\", \"time_to_live\": \"one_year\", \"metadata\": \"platform:netflix\"}]}"}
|
|
10
|
+
{"test_id": "mention_existing_profile", "description": "Mention existing profile when user references it again", "interactions": [{"role": "user", "content": "I'm ordering pizza again for dinner tonight", "user_action": "none", "user_action_description": "", "interacted_image_url": null, "image_encoding": null, "timestamp": 1703123456}], "existing_profiles": [{"profile_content": "loves Italian food, especially pizza", "metadata": "cuisine:italian", "created_timestamp": 1703120000, "last_modified_timestamp": 1703120000}, {"profile_content": "enjoys cooking at home", "metadata": "activity:cooking", "created_timestamp": 1703120000, "last_modified_timestamp": 1703120000}], "agent_context_prompt": "Extract user profiles from interactions", "context_prompt": "Analyze the following user interactions", "profile_content_definition_prompt": "food preferences and dining habits", "metadata_definition_prompt": "cuisine type from: italian, japanese, mexican, american, indian, chinese", "expected_label": "{\"mention\": [\"loves Italian food, especially pizza\"]}"}
|