initial commit: slides ready + upgraded

This commit is contained in:
2026-05-24 10:37:53 +02:00
commit f6f46972c3
173 changed files with 16756 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
---
layout: default
---
# Few-Shot Prompting
<div class="mt-8 text-sm">
<v-click>
<div class="mb-6">
**Few-shot**: Dar ejemplos al LLM para que aprenda el patrón deseado
</div>
</v-click>
<v-click>
```typescript
import { ChatPromptTemplate } from "@langchain/core/prompts";
const template = ChatPromptTemplate.fromMessages([
["system", "Clasifica el sentimiento de tweets"],
["human", "Me encanta este producto!"],
["ai", "positivo"],
["human", "No funciona bien :("],
["ai", "negativo"],
["human", "{tweet}"] // El tweet a clasificar
]);
const response = await model.invoke(
await template.invoke({ tweet: "Buena experiencia" })
);
// → "positivo"
```
</v-click>
</div>