triggercode GmbH
Generative AI, trainiert auf riesigen Textkorpus, Instruktionen und Human Feedback (RLHF).
GPT-4 | Llama 2 | PaLM 2 | FreeWill2
👉 Open Source Models
Context-Größe (Tokens)
„Kickstart für KI Anwendungen mit der GPT API und LangChain”
[45390, 9688, 277, 25151, 509, 40, 1052, 86, 437, 2150, 268, 10255, 4587, 402, 11571, 7824, 3318, 16332, 35491]
1 Token ~ 0.75 Worte
16k Context ~ 12k Worte
LangChain ist ein Framework für die Entwicklung von Anwendungen, die auf LLMs basieren.
const model = new OpenAI({ temperature: 0 });
const parser = StructuredOutputParser
.fromNamesAndDescriptions({
answer: "answer to the user's question",
source: "source used to answer the user's question," +
"should be a website.",
});
const formatInstructions = parser.getFormatInstructions();
const prompt = new PromptTemplate({
template:
"Answer the user's question as best as possible.\n" +
"{formatInstructions}\n{question}",
inputVariables: ["question"],
partialVariables: { formatInstructions },
});
const userPrompt = await prompt.format({
question: "What is the capital of France?",
});
const response = await model.call(userPrompt);
const result = await parser.parse(response)
console.log(result);
{
answer: 'Paris',
source: 'https://en.wikipedia.org/wiki/Paris'
}
const chain1 = new LLMChain({ llm, prompt: prompt1 });
const chain2 = new LLMChain({ llm, prompt: prompt2 });
const simpleSequentialChain = new SimpleSequentialChain({
chains: [chain1, chain2]
});
simpleSequentialChain.run("Software Product")
[…] Generiere einen Produktnamen in der Kategorie {productType}.
Generiere eine Beschreibung für ein Produkt mit dem Namen {productName}.
Chains
Sequenz der Aktionen ist vordefiniert
LLM only
Agents
LLM ermittelt nächste Aktion bzw. Aktionssequenz
Externe „Tools” möglich
Und vieles mehr ...
🏁 Draft-Generator
Mit einfacher Anweisung und drei Beispielen konnten alle ~100 PDFs in JSON überführt werden.
Die verwendeten Lösungen und Branchen wurden extrahiert.
Alle Beispiele mit Mapping von Input-Text zu Output-JSON und Metadaten sind in SQL Datenbank abgelegt.
Mithilfe der Beispiele werden nun neue Success Stories generiert.
Tobias Braner
Geschäftsführer
triggercode GmbH
✉️ t.braner@triggerco.de