用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/majiayu000/claude-skill-registry --skill llm-pipeline命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
LLM token logprobs and calibration. Per-decision confidence, ECE, Brier, reliability diagrams, low-confidence triage.
Analyze LLM token logprobs and calibration. Use for per-decision confidence, ECE, Brier scores, reliability diagrams, and low-confidence triage.
回顾最近 N 天的 Claude Code 使用记录——扫描原始会话数据,按主题分组汇总"我都做了什么",并从个人操作系统视角输出模式、风险与增删建议。当用户说 /recap、"看看我这几天做了什么"、"回顾一下我最近的会话"、"这两天我用 claude 干了啥"、"活动回顾" 时使用。
基于 SOC 职业分类
| name | llm-pipeline |
| description | Pydantic-AI agents, RAG, embeddings for Pulse Radar knowledge extraction. |
score = await importance_scorer.score(message)
if unprocessed_count >= 10: # ai_config.message_threshold await extract_knowledge_from_messages_task.kiq()
agent = Agent( model=model, system_prompt=get_extraction_prompt("uk"), output_type=KnowledgeExtractionOutput, # CRITICAL: structured output output_retries=5, ) result = await agent.run(messages_content)
await save_topics_and_atoms(result.output) await embed_atoms_batch_task.kiq(atom_ids)
</extraction-flow>
<agent-creation>
```python
from pydantic_ai import Agent
from pydantic_ai.models.openai import OpenAIChatModel
# Provider-specific model creation
if provider.type == "ollama":
model = OpenAIChatModel(
model_name=agent_config.model_name,
provider=OllamaProvider(base_url=provider.base_url),
)
elif provider.type == "openai":
model = OpenAIChatModel(
model_name=agent_config.model_name,
provider=OpenAIProvider(api_key=api_key),
)
# Agent with structured output
agent = Agent(
model=model,
output_type=MyPydanticModel, # Forces JSON schema
system_prompt="...",
output_retries=5,
)
1. **JSON-only output** — explicitly state "respond with ONLY JSON"
2. **Schema in prompt** — include exact JSON structure expected
3. **Language enforcement** — "ALL fields MUST be in Ukrainian"
4. **Retry on language mismatch** — use `get_strengthened_prompt()`
5. **No markdown** — models often wrap JSON in ```json blocks
```python
# OpenAI: 1536 dimensions (text-embedding-3-small)
# Ollama: 1024 dimensions (mxbai-embed-large) → padded to 1536
await embedding_service.generate_embedding(text) await embedding_service.embed_messages_batch(session, ids, batch_size=10)
</embedding-service>
<rag-context>
```python
# SemanticSearchService uses pgvector cosine similarity
similar_atoms = await search_service.search_atoms(
query_embedding=embedding,
limit=5,
threshold=0.65, # ai_config.semantic_search
)
# RAGContextBuilder assembles context for LLM
context = await rag_builder.build_context(
query=user_query,
similar_atoms=similar_atoms,
related_messages=messages,
)
## RAG vs CAG
| Strategy | Data Type | Pulse Radar Use |
|---|---|---|
| RAG | Dynamic (messages, atoms) | Semantic search, history retrieval |
| CAG | Static (project config) | Keywords, glossary, components preloaded |
Hybrid: Project context (CAG) + similar atoms (RAG) = best extraction quality. See: @references/rag.md for detailed comparison.
- **ADR-003:** AI Importance Scoring — LLM Judge vs Heuristics (LLM chosen) - **ADR-006:** Pydantic AI vs LangChain — Hexagonal architecture (Pydantic AI chosen) - @references/architecture.md — Hexagonal LLM domain structure - @references/pydantic-ai.md — Agent configuration, streaming - @references/rag.md — RAG & CAG context strategies