跳到正文
Skillpedia
智能体48k · #5088

llm-ops

它能做什么

这项技能可以帮助你搭建和管理更先进、更可靠的人工智能(AI)系统,用于生产环境。它涵盖了从数据整理到成本优化,再到保证 AI 回答质量的全过程。

适用场景

  • ✓当你希望 AI 基于你自己的文档来回答问题时。
  • ✓当你需要优化 AI 模型的使用成本时。
  • ✓当你希望确保 AI 的回答准确可靠时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/llm-ops/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/llm-ops/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我该如何让 AI 根据我提供的文档来回答问题?”

每周 5 个新技能,1 分钟读完。

工作原理

它的做法是搭建一套系统:AI 先理解你的文档,并对其进行整理,然后利用这些整理好的内容找到正确信息,再进行回答。这样可以确保答案基于你提供的内容。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

LLM-OPS -- IA de Producao

Overview

LLM Operations -- RAG, embeddings, vector databases, fine-tuning, prompt engineering avancado, custos de LLM, evals de qualidade e arquiteturas de IA para producao. Ativar para: implementar RAG, criar pipeline de embeddings, Pinecone/Chroma/pgvector, fine-tuning, prompt engineering, reducao de custos de LLM, evals, cache semantico, streaming, agents.

When to Use This Skill

  • When you need specialized assistance with this domain

Do Not Use This Skill When

  • The task is unrelated to llm ops
  • A simpler, more specific tool can handle the request
  • The user needs general-purpose assistance without domain expertise

How It Works

A diferenca entre um prototipo de IA e um produto de IA e operabilidade. LLM-Ops e a engenharia que torna IA confiavel, escalavel e economica.


Arquitetura Rag Completa

[Documentos] -> [Chunking] -> [Embeddings] -> [Vector DB] | [Query] -> [Embed query] -> [Semantic Search] -> [Top K chunks] | [LLM + Context] -> [Resposta]

Pipeline De Indexacao

from anthropic import Anthropic import chromadb

client = Anthropic()
chroma = chromadb.PersistentClient(path="./chroma_db")

def chunk_text(text, chunk_size=500, overlap=50):
    words = text.split()
    chunks = []
    for i in range(0, len(words), chunk_size - overlap):
        chunk = " ".join(words[i:i + chunk_size])
        if chunk: chunks.append(chunk)
    return chunks

def index_document(doc_id, content_text, metadata=None):
    chunks = chunk_text(content_text)
    ids = [f"{doc_id}_chunk_{i}" for i in range(len(chunks))]
    collection.upsert(ids=ids, documents=chunks)
    return len(chunks)

Pipeline De Query Com Rag

def rag_query(query, top_k=5, system=None): results = collection.query( query_texts=[query], n_results=top_k, include=["documents", "metadatas", "distances"]) context_parts = [] for doc, meta, dist in zip(results["documents"][0], results["metadatas"][0], results["distances"][0]): if dist < 1.5: src = meta.get("source", "doc") context_parts.append(f"[Fonte: {src}] {doc}") context = "


".join(context_parts) response = client.messages.create( model="claude-opus-4-20250805", max_tokens=1024, system=system or "Responda baseado no contexto.", messages=[{"role": "user", "content": f"Contexto: {context}

{query}"}]) return response.content[0].text


Escolha Do Vector Db

DB Melhor Para Hosting Custo
Chroma Desenvolvimento, local Self-hosted Gratis
pgvector Ja usa PostgreSQL Self/Cloud Gratis
Pinecone Producao gerenciada Cloud USD 70+/mes
Weaviate Multi-modal Self/Cloud Gratis+
Qdrant Alta performance Self/Cloud Gratis+

Pgvector

CREATE EXTENSION IF NOT EXISTS vector; CREATE TABLE knowledge_embeddings ( id UUID PRIMARY KEY DEFAULT gen_random_uuid(), content TEXT NOT NULL, embedding vector(1536), metadata JSONB, created_at TIMESTAMPTZ DEFAULT NOW() ); CREATE INDEX ON knowledge_embeddings USING ivfflat (embedding vector_cosine_ops) WITH (lists = 100); SELECT content, 1 - (embedding <=> QUERY_VECTOR) AS similarity FROM knowledge_embeddings ORDER BY similarity DESC LIMIT 5;


Estrutura De Prompt De Elite

Componentes do system prompt Auri:

  • Identidade: Nome (Auri), Tom (Natural, caloroso, direto), Plataforma (Amazon Alexa)
  • Regras: Maximo 3 paragrafos curtos, sem markdown, linguagem conversacional
  • Capacidades: analise de negocios, conselho baseado em dados, criatividade
  • Limitacoes: sem internet tempo real, sem transacoes financeiras
  • Personalizacao: {user_name}, {user_preferences}, {relevant_history}

Chain-Of-Thought

def cot_analysis(problem: str) -> str: steps = [ "1. O que exatamente esta sendo pedido?", "2. Que informacoes sao criticas para resolver?", "3. Quais abordagens possiveis existem?", "4. Qual abordagem e melhor e por que?",

…

常见问题

什么是 RAG?

RAG(检索增强生成)是一种技术,让 AI 在生成答案之前,先去外部数据库(比如你的文档)中检索信息,从而让回答更准确、更有依据。

什么是“嵌入”(Embeddings)?

嵌入是文本的数值表示,帮助 AI 理解词语和短语的含义及其之间的关系,从而更容易检索到相关信息。

为什么要优化 AI 成本?

先进的 AI 模型可能很昂贵。优化成本意味着高效地使用 AI,在不浪费开支的前提下获得最佳效果。

详情

作者的原始描述

LLM Operations -- RAG, embeddings, vector databases, fine-tuning, prompt engineering avancado, custos de LLM, evals de qualidade e arquiteturas de IA para producao.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#5088
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能