Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Bending_LLMs_To_Your_Will__and_your_will_is_to_create_structured_data_.pdf

Tuana Çelik
January 26, 2024
17

 Bending_LLMs_To_Your_Will__and_your_will_is_to_create_structured_data_.pdf

Tuana Çelik

January 26, 2024
Tweet

Transcript

  1. Tuana Çelik Hosting LLM Apps @ Scale with Haystack, Titan

    ML & Jina AI Bending LLMs To Your Will …(and your will is to create structured data) Open NLP Meetup
  2. 01 - What is it? • Twitter: @tuanacelik • Linkedin:

    Tuana Celik • GitHub: @tuanacelik • 🏗 Open source LLM Framework: Haystack • 📍 Amsterdam, Netherlands Tuana Çelik Lead Developer Advocate 🥑 deepset
  3. 1 Using LLMs to extract information in a structured format

    2 3 Validating JSON outputs Haystack: Looping Pipelines and Custom Components
  4. • Fully open-source framework built in Python for custom LLM

    applications • Provides tools that developers need to build state-of-the-art NLP systems Haystack (2.0-Beta)
  5. • Fully open-source framework built in Python for custom LLM

    applications • Provides tools that developers need to build state-of-the-art NLP systems • Building blocks: Pipelines & Components Haystack (2.0-Beta)
  6. • Haystack provides a simple interface for the creation of

    custom components. • These components can have more than one output, or outputs that changes depending on certain conditions Haystack (2.0-Beta): Custom Components
  7. Customized Prompts Prompt Given the following context, answer the question.

    If the answer is not contained within the context, say ‘I don’t know’. Question Answering Context: {{context}} Question: {{question}} Answer: Prompt Summarize the following text. Summarization Text: {{text}} Summary: Question Generation Document: {{document}} Questions: Prompt Given the following document, generate some questions
  8. Validated Structured Output Generator Recipe 󰟷 • A “Validator” component

    • A very clever prompt • An LLM • A pipeline to stitch them all
  9. The LLM: a Generator Component Recipe 󰟷 A “Validator” component

    ✅ A very clever prompt ✅ An LLM ✅ A pipeline Generators 📓
  10. The Pipeline Recipe 󰟷 A “Validator” component ✅ A very

    clever prompt ✅ An LLM ✅ A pipeline ✅