{
"event": "PreToolUse",
"tool_name": "mcp__mcp-docs__docs_create",
"tool_input": {
"title": "LLM-Generierung",
"slug": "llm-generierung",
"parent_id": 100,
"status": "published",
"sort_order": 8,
"content": "<h2>LLM-Generierung<\/h2>\n\n<h3>Funktion<\/h3>\n<ul>\n<li>Prompt mit Kontext an LLM senden<\/li>\n<li>Antwort basierend auf RAG-Kontext generieren<\/li>\n<li>System-Prompt für Verhaltenssteuerung<\/li>\n<li>Quellenbasierte, faktentreue Antworten<\/li>\n<\/ul>\n\n<h3>Eingabe<\/h3>\n<ul>\n<li>Formatierter Kontext aus vorherigem Schritt<\/li>\n<li>Nutzerfrage \/ Briefing<\/li>\n<li>System-Prompt (Persona, Regeln)<\/li>\n<li>Modell-Parameter (temperature, max_tokens)<\/li>\n<\/ul>\n\n<h3>Ausgabe<\/h3>\n<ul>\n<li>Generierte Antwort \/ Content<\/li>\n<li>Token-Verbrauch (Input\/Output)<\/li>\n<\/ul>\n\n<h3>Verfügbare LLMs<\/h3>\n<table>\n<thead><tr><th>Anbieter<\/th><th>Modelle<\/th><th>Verwendung<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>Anthropic (Cloud)<\/td><td>Claude Sonnet, Opus, Haiku<\/td><td>Chat, Content Studio<\/td><\/tr>\n<tr><td>Ollama (Lokal)<\/td><td>Gemma3, Mistral, Qwen<\/td><td>Chat, Content Studio<\/td><\/tr>\n<\/tbody>\n<\/table>\n\n<h3>System-Prompt (Chat)<\/h3>\n<pre>\nDu bist ein hilfreicher Assistent für Fragen zu \nsystemischem Teamcoaching und Teamentwicklung.\n\nBeantworte die Frage des Nutzers basierend auf \ndem bereitgestellten Kontext.\n- Antworte auf Deutsch\n- Sei präzise und hilfreich\n- Wenn der Kontext die Frage nicht beantwortet, \n sage das ehrlich\n- Verweise auf die Quellen wenn passend\n<\/pre>\n\n<h3>Beteiligte Komponenten<\/h3>\n<table>\n<thead><tr><th>Anbieter<\/th><th>Komponente<\/th><th>Funktion<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>Claude<\/td><td><code>chat.py:ask_claude()<\/code><\/td><td>Anthropic API Aufruf<\/td><\/tr>\n<tr><td>Ollama<\/td><td><code>chat.py:ask_ollama()<\/code><\/td><td>Lokaler LLM Aufruf<\/td><\/tr>\n<tr><td>Content Studio<\/td><td><code>generate.py:call_llm()<\/code><\/td><td>Unified LLM Interface<\/td><\/tr>\n<\/tbody>\n<\/table>\n\n<h3>Code-Beispiel (Claude)<\/h3>\n<pre>\ndef ask_claude(question, context):\n client = anthropic.Anthropic(api_key=ANTHROPIC_API_KEY)\n \n message = client.messages.create(\n model=ANTHROPIC_MODEL,\n max_tokens=1500,\n system=system_prompt,\n messages=[{\"role\": \"user\", \"content\": user_prompt}]\n )\n \n return message.content[0].text\n<\/pre>\n\n<h3>Code-Beispiel (Ollama)<\/h3>\n<pre>\ndef ask_ollama(question, context, model=\"gemma3:27b\"):\n prompt = f\"\"\"Kontext:\\n{context}\\n\\nFrage: {question}\\n\\nAntwort:\"\"\"\n \n response = requests.post(\n f\"{OLLAMA_HOST}\/api\/generate\",\n json={\"model\": model, \"prompt\": prompt, \"stream\": False},\n timeout=120\n )\n \n return response.json().get(\"response\", \"\")\n<\/pre>\n\n<h3>Parameter<\/h3>\n<table>\n<thead><tr><th>Parameter<\/th><th>Chat<\/th><th>Content Studio<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>max_tokens<\/td><td>1500<\/td><td>4096+<\/td><\/tr>\n<tr><td>temperature<\/td><td>0.7<\/td><td>0.7 (konfigurierbar)<\/td><\/tr>\n<tr><td>timeout<\/td><td>120s<\/td><td>900s<\/td><\/tr>\n<\/tbody>\n<\/table>"
}
}
{
"tool_response": [
{
"type": "text",
"text": "{\n \"success\": true,\n \"doc\": {\n \"id\": 118,\n \"parent_id\": 100,\n \"slug\": \"llm-generierung\",\n \"path\": \"\/prozesse\/rag-prozess\/llm-generierung\",\n \"title\": \"LLM-Generierung\",\n \"description\": null,\n \"content\": \"<h2>LLM-Generierung<\/h2>\\n\\n<h3>Funktion<\/h3>\\n<ul>\\n<li>Prompt mit Kontext an LLM senden<\/li>\\n<li>Antwort basierend auf RAG-Kontext generieren<\/li>\\n<li>System-Prompt für Verhaltenssteuerung<\/li>\\n<li>Quellenbasierte, faktentreue Antworten<\/li>\\n<\/ul>\\n\\n<h3>Eingabe<\/h3>\\n<ul>\\n<li>Formatierter Kontext aus vorherigem Schritt<\/li>\\n<li>Nutzerfrage \/ Briefing<\/li>\\n<li>System-Prompt (Persona, Regeln)<\/li>\\n<li>Modell-Parameter (temperature, max_tokens)<\/li>\\n<\/ul>\\n\\n<h3>Ausgabe<\/h3>\\n<ul>\\n<li>Generierte Antwort \/ Content<\/li>\\n<li>Token-Verbrauch (Input\/Output)<\/li>\\n<\/ul>\\n\\n<h3>Verfügbare LLMs<\/h3>\\n<table>\\n<thead><tr><th>Anbieter<\/th><th>Modelle<\/th><th>Verwendung<\/th><\/tr><\/thead>\\n<tbody>\\n<tr><td>Anthropic (Cloud)<\/td><td>Claude Sonnet, Opus, Haiku<\/td><td>Chat, Content Studio<\/td><\/tr>\\n<tr><td>Ollama (Lokal)<\/td><td>Gemma3, Mistral, Qwen<\/td><td>Chat, Content Studio<\/td><\/tr>\\n<\/tbody>\\n<\/table>\\n\\n<h3>System-Prompt (Chat)<\/h3>\\n<pre>\\nDu bist ein hilfreicher Assistent für Fragen zu \\nsystemischem Teamcoaching und Teamentwicklung.\\n\\nBeantworte die Frage des Nutzers basierend auf \\ndem bereitgestellten Kontext.\\n- Antworte auf Deutsch\\n- Sei präzise und hilfreich\\n- Wenn der Kontext die Frage nicht beantwortet, \\n sage das ehrlich\\n- Verweise auf die Quellen wenn passend\\n<\/pre>\\n\\n<h3>Beteiligte Komponenten<\/h3>\\n<table>\\n<thead><tr><th>Anbieter<\/th><th>Komponente<\/th><th>Funktion<\/th><\/tr><\/thead>\\n<tbody>\\n<tr><td>Claude<\/td><td><code>chat.py:ask_claude()<\/code><\/td><td>Anthropic API Aufruf<\/td><\/tr>\\n<tr><td>Ollama<\/td><td><code>chat.py:ask_ollama()<\/code><\/td><td>Lokaler LLM Aufruf<\/td><\/tr>\\n<tr><td>Content Studio<\/td><td><code>generate.py:call_llm()<\/code><\/td><td>Unified LLM Interface<\/td><\/tr>\\n<\/tbody>\\n<\/table>\\n\\n<h3>Code-Beispiel (Claude)<\/h3>\\n<pre>\\ndef ask_claude(question, context):\\n client = anthropic.Anthropic(api_key=ANTHROPIC_API_KEY)\\n \\n message = client.messages.create(\\n model=ANTHROPIC_MODEL,\\n max_tokens=1500,\\n system=system_prompt,\\n messages=[{\\\"role\\\": \\\"user\\\", \\\"content\\\": user_prompt}]\\n )\\n \\n return message.content[0].text\\n<\/pre>\\n\\n<h3>Code-Beispiel (Ollama)<\/h3>\\n<pre>\\ndef ask_ollama(question, context, model=\\\"gemma3:27b\\\"):\\n prompt = f\\\"\\\"\\\"Kontext:\\\\n{context}\\\\n\\\\nFrage: {question}\\\\n\\\\nAntwort:\\\"\\\"\\\"\\n \\n response = requests.post(\\n f\\\"{OLLAMA_HOST}\/api\/generate\\\",\\n json={\\\"model\\\": model, \\\"prompt\\\": prompt, \\\"stream\\\": False},\\n timeout=120\\n )\\n \\n return response.json().get(\\\"response\\\", \\\"\\\")\\n<\/pre>\\n\\n<h3>Parameter<\/h3>\\n<table>\\n<thead><tr><th>Parameter<\/th><th>Chat<\/th><th>Content Studio<\/th><\/tr><\/thead>\\n<tbody>\\n<tr><td>max_tokens<\/td><td>1500<\/td><td>4096+<\/td><\/tr>\\n<tr><td>temperature<\/td><td>0.7<\/td><td>0.7 (konfigurierbar)<\/td><\/tr>\\n<tr><td>timeout<\/td><td>120s<\/td><td>900s<\/td><\/tr>\\n<\/tbody>\\n<\/table>\",\n \"status\": \"published\",\n \"sort_order\": 8,\n \"depth\": 2,\n \"created_at\": \"2025-12-24T10:01:03\",\n \"updated_at\": \"2025-12-24T10:01:03\"\n },\n \"message\": \"Dokument 'LLM-Generierung' erstellt mit ID 118\"\n}"
}
]
}