<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Anni Chen</title>
    <description>The latest articles on DEV Community by Anni Chen (@anni_in_tech).</description>
    <link>https://dev.to/anni_in_tech</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1800055%2F775cc1b9-02ea-4839-bde2-45a0cd13e827.png</url>
      <title>DEV Community: Anni Chen</title>
      <link>https://dev.to/anni_in_tech</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/anni_in_tech"/>
    <language>en</language>
    <item>
      <title>Join me in this new blog series!</title>
      <dc:creator>Anni Chen</dc:creator>
      <pubDate>Mon, 12 May 2025 08:28:32 +0000</pubDate>
      <link>https://dev.to/anni_in_tech/join-me-in-this-new-blog-series-1i2g</link>
      <guid>https://dev.to/anni_in_tech/join-me-in-this-new-blog-series-1i2g</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/anni_in_tech" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1800055%2F775cc1b9-02ea-4839-bde2-45a0cd13e827.png" alt="anni_in_tech"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/anni_in_tech/from-vibe-to-viable-artemis-beyond-code-generation-4pan" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;From Vibe to Viable: Beyond Code Generation&lt;/h2&gt;
      &lt;h3&gt;Anni Chen ・ May 12&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#genai&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#vibecoding&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#artemis&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#performance&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>genai</category>
      <category>vibecoding</category>
      <category>artemis</category>
      <category>performance</category>
    </item>
    <item>
      <title>From Vibe to Viable: Beyond Code Generation</title>
      <dc:creator>Anni Chen</dc:creator>
      <pubDate>Mon, 12 May 2025 08:22:37 +0000</pubDate>
      <link>https://dev.to/anni_in_tech/from-vibe-to-viable-artemis-beyond-code-generation-4pan</link>
      <guid>https://dev.to/anni_in_tech/from-vibe-to-viable-artemis-beyond-code-generation-4pan</guid>
      <description>&lt;p&gt;🔗 &lt;a href="https://www.turintech.ai/resources/from-vibe-to-viable-artemis-beyond-code-generation" rel="noopener noreferrer"&gt;Original post here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Part of the “From Vibe to Viable” Series&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  👋 Hello Devs!
&lt;/h2&gt;

&lt;p&gt;I’m Anni, a Developer Evangelist here at &lt;a href="https://www.turintech.ai/" rel="noopener noreferrer"&gt;TurinTech&lt;/a&gt;. I'm super excited to launch this blog series to share some thoughts on &lt;a href="https://www.turintech.ai/artemis" rel="noopener noreferrer"&gt;Artemis&lt;/a&gt;, explore the intersection of AI with Data Science, and how this could  help you on your Next AI Coding journey. &lt;/p&gt;

&lt;p&gt;Generative AI (or GenAI) took us by a storm when &lt;a href="https://openai.com/index/chatgpt/" rel="noopener noreferrer"&gt;ChatGPT was first introduced in late 2022.&lt;/a&gt; Developer workflows have quickly evolved from chat interfaces to AI-enhanced IDEs and now towards fully AI-native environments. With Anthropic's CEO predicting&lt;a href="https://www.businessinsider.com/anthropic-ceo-ai-90-percent-code-3-to-6-months-2025-3" rel="noopener noreferrer"&gt; AI will write 90% of code by late 2025&lt;/a&gt;, we face questions around software reliability, efficiency, and trust. &lt;/p&gt;

&lt;p&gt;As &lt;a href="https://x.com/karpathy/status/1886192184808149383?lang=en" rel="noopener noreferrer"&gt;"vibe coding"&lt;/a&gt; (Andrej Karpathy's term for when developers "forget code exists") becomes increasingly prevalent, we're also introducing a new challenge—"vibe debugging." How will we effectively review and improve the growing volume of AI-generated code? How do we validate AI-generated code beyond basic functionality? Can we trust AI outputs in production? &lt;/p&gt;

&lt;h2&gt;
  
  
  From the Code You Have, To the Code You Need
&lt;/h2&gt;

&lt;p&gt;If you’re already using tools like GitHub Copilot, Cursor, ChatGPT, or even custom LLM workflows to speed up coding, awesome. These tools help you move faster and unblock your thinking. But they can also come with new risks—like hallucinated packages, unoptimized code that burns your cloud resource and code that looks right but contains hidden bugs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;That’s where Artemis comes in&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Artemis is built to complement and work with both human developers and other GenAI coding tools—not replace them. Unlike simple LLM wrappers, Artemis and its Intelligence Engine uses a mixture of tools (context manager, evaluator, validator, LLMs, etc.) and our data science expertise to take the code you already have (written by a human, Copilot, ChatGPT, or an intern) and helps you evolve it into the code you actually need. &lt;/p&gt;

&lt;p&gt;Data science empowers your coding journey at every step, from analyzing prompt effectiveness and selecting task-optimized models to evaluating and scoring AI-generated outputs against rigorous validation criteria. This quantitative foundation ensures AI-generated code meets our real-world requirements and gets us the most optimal results.&lt;/p&gt;

&lt;p&gt;Whether you are modernizing legacy code or dealing with AI-generated “vibe code,” Artemis can help score, optimize, and validate your way to better results. Join me in the next "From Vibe to Viable" and learn about how we optimized AI-generated code from GitHub Copilot and improved its performance in Artemis. &lt;/p&gt;

&lt;p&gt;Thanks for reading and see you again soon!&lt;/p&gt;

&lt;p&gt;👩‍💻 Anni, Developer Evangelist @ TurinTech&lt;br&gt;
&lt;em&gt;Follow me on &lt;a href="https://x.com/anni_in_tech" rel="noopener noreferrer"&gt;X&lt;/a&gt; or &lt;a href="https://www.linkedin.com/in/annichen13/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>genai</category>
      <category>vibecoding</category>
      <category>artemis</category>
      <category>performance</category>
    </item>
    <item>
      <title>Building an LLM-Powered Knowledge Curation System</title>
      <dc:creator>Anni Chen</dc:creator>
      <pubDate>Fri, 13 Sep 2024 17:59:49 +0000</pubDate>
      <link>https://dev.to/anni_in_tech/building-an-llm-powered-knowledge-curation-system-26nd</link>
      <guid>https://dev.to/anni_in_tech/building-an-llm-powered-knowledge-curation-system-26nd</guid>
      <description>&lt;p&gt;&lt;strong&gt;Read the &lt;a href="https://www.instill.tech/blog/mastering-openai-structured-outputs" rel="noopener noreferrer"&gt;original post here&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In our previous blog, &lt;a href="https://www.instill.tech/blog/llm-structured-outputs" rel="noopener noreferrer"&gt;"The Best Way to Generate Structured Output from LLMs"&lt;/a&gt;, we explored the capabilities of OpenAI's Structured Outputs API by comparing it with tools like Langchain, BAML, and others. We demystified how format restrictions can negatively impact Large Language Models (LLMs) and introduced a multi-step approach using &lt;a href="https://www.instill.tech/docs/vdp/introduction" rel="noopener noreferrer"&gt;&lt;strong&gt;Instill VDP&lt;/strong&gt;&lt;/a&gt; to navigate these challenges.&lt;/p&gt;

&lt;p&gt;Today, we're exploring the bigger picture of how &lt;a href="https://openai.com/index/introducing-structured-outputs-in-the-api/" rel="noopener noreferrer"&gt;OpenAI's Structured Outputs API&lt;/a&gt; can be combined with applications to build powerful end-to-end pipelines, enabling developers to leverage JSON schemas to enhance field completeness and boost the reliability of downstream tasks. As we aim for stable LLM integration in production environments, this tutorial will walk you through how to build an LLM-powered knowledge curation system and equip you with essential tips and best practices.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building an LLM-Powered Knowledge Curation System
&lt;/h2&gt;

&lt;p&gt;Let's create a tool to automate web research and summarization, transforming &lt;br&gt;
online data into structured insights:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Searches Google with your query&lt;/li&gt;
&lt;li&gt;Scrapes the top result's content into Markdown-formatted text&lt;/li&gt;
&lt;li&gt;Summarizes information in a pre-defined structured format&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
  
  
  Try it Yourself!
&lt;/h3&gt;

&lt;p&gt;Click the links below to view and try these pipelines out for yourself - &lt;strong&gt;for free&lt;/strong&gt; - on the &lt;strong&gt;Instill Cloud&lt;/strong&gt; platform!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Full Pipeline: &lt;a href="https://instill.tech/instill-ai/pipelines/structured-web-insights/playground" rel="noopener noreferrer"&gt;structured-web-insights&lt;/a&gt; (requires your own Google API key, see &lt;a href="https://www.instill.tech/docs/component/application/googlesearch#setup" rel="noopener noreferrer"&gt;setup docs&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;URL-only Version &lt;a href="https://instill.tech/instill-ai/pipelines/structured-web-insights-from-url/playground" rel="noopener noreferrer"&gt;structured-web-insights-from-url&lt;/a&gt; (no Google search, simply input a URL of your choice)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://instill.tech/instill-ai/pipelines/structured-web-insights-from-url/playground" class="ltag_cta ltag_cta--branded" rel="noopener noreferrer"&gt;Try Instill Cloud ☁️&lt;/a&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Step-by-Step Tutorial
&lt;/h2&gt;

&lt;p&gt;We will use OpenAI's Structued Outputs and &lt;strong&gt;Instill VDP&lt;/strong&gt; to build our LLM-powered knowledge curation pipeline. Watch &lt;a href="https://www.youtube.com/watch?v=x0XsmuCrit8" rel="noopener noreferrer"&gt;this video&lt;/a&gt; for a step-by-step guide&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/x0XsmuCrit8"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Create an account on &lt;strong&gt;Instill Cloud&lt;/strong&gt; by following the &lt;a href="https://www.instill.tech/docs/quickstart#%EF%B8%8F-instill-cloud" rel="noopener noreferrer"&gt;steps here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Configure Google Search &amp;amp; API key
&lt;/h2&gt;

&lt;p&gt;To start using the Google Search Component on Instill VDP, you will need to first create an API key. See &lt;a href="https://www.instill.tech/docs/component/application/googlesearch#setup" rel="noopener noreferrer"&gt;Google Search Setup docs&lt;/a&gt; for more details.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to &lt;a href="https://programmablesearchengine.google.com/controlpanel/all" rel="noopener noreferrer"&gt;Programmable Search Engine control panel&lt;/a&gt; and create a new Search Engine ID&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwu5wa9xy5yc78sykhfdp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwu5wa9xy5yc78sykhfdp.png" alt="Configurations for Google's Programmable Search Engine" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Once created, click &lt;code&gt;Customize&lt;/code&gt; to see your Search engine ID&lt;/li&gt;
&lt;li&gt;Copy the Search engine ID for later&lt;/li&gt;
&lt;li&gt;Go to &lt;a href="https://developers.google.com/custom-search/v1/overview#api-key" rel="noopener noreferrer"&gt;Google's Custom Search JSON API documentation&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;code&gt;Get a Key&lt;/code&gt; to generate your API key&lt;/li&gt;
&lt;li&gt;Copy the API key for later&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;You can further explore &lt;a href="https://support.google.com/programmable-search/answer/12420301?hl=en&amp;amp;ref_topic=4513743&amp;amp;sjid=8158226117509927139-EU" rel="noopener noreferrer"&gt;Advanced Programmable Search Engine features&lt;/a&gt; to refine search features depending on your use case such as safe search, restrict region, filter images, sort result, etc.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Step 2: Create a new pipeline
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Go to &lt;a href="https://instill.tech/featured/pipelines" rel="noopener noreferrer"&gt;Instill Cloud&lt;/a&gt; and find 
your &lt;code&gt;Pipelines&lt;/code&gt; tab in the top left&lt;/li&gt;
&lt;li&gt;Click &lt;code&gt;+ Create Pipeline&lt;/code&gt; in the top right to enter the pipeline editor&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgrbo49jyjaggyjugom6y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgrbo49jyjaggyjugom6y.png" alt="Recipe editor (left), pipeline preview &amp;amp; input/output (right)" width="800" height="402"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Add Google Search and query
&lt;/h2&gt;

&lt;p&gt;In the pipeline recipe, add input variables:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;variable&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;google-cse-id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;CSE ID&lt;/span&gt;
    &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ID of search engine to use&lt;/span&gt;
    &lt;span class="na"&gt;instill-format&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;string&lt;/span&gt;
  &lt;span class="na"&gt;search-query&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Search Query&lt;/span&gt;
    &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;the Google search query&lt;/span&gt;
    &lt;span class="na"&gt;instill-format&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;string&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add Google Search Component:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;component&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;google&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;google-search&lt;/span&gt;
    &lt;span class="na"&gt;task&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;TASK_SEARCH&lt;/span&gt;
    &lt;span class="na"&gt;input&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;include-link-html&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
      &lt;span class="na"&gt;include-link-text&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
      &lt;span class="na"&gt;query&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${variable.search-query}&lt;/span&gt;
      &lt;span class="na"&gt;top-k&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10&lt;/span&gt;
    &lt;span class="na"&gt;setup&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;api-key&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${secret.google-search-api-key}&lt;/span&gt;
      &lt;span class="na"&gt;cse-id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${variable.google-cse-id}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Please create and store your Google Search API key securely in Secrets by following the steps in our &lt;a href="https://www.instill.tech/docs/vdp/secret" rel="noopener noreferrer"&gt;Secret Management docs&lt;/a&gt; for best practices.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Step 4: Scrape website content
&lt;/h2&gt;

&lt;p&gt;Add a Web Component and select scrape webpage task&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;set include-html to &lt;code&gt;true&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;set only-main-content to &lt;code&gt;true&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;set url to reference google variable as shown below
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;scraper&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;web&lt;/span&gt;
  &lt;span class="na"&gt;task&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;TASK_SCRAPE_WEBPAGE&lt;/span&gt;
  &lt;span class="na"&gt;input&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;include-html&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
    &lt;span class="na"&gt;only-main-content&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
    &lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${google.output.results[0].link}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 5: Summarize the scraped content
&lt;/h2&gt;

&lt;p&gt;Add an OpenAI Component to summarize the page content&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;set the model to use &lt;code&gt;gpt-4o-mini&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;set temperature to &lt;code&gt;0&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;set the prompt as shown below&lt;/li&gt;
&lt;li&gt;set the system-message as shown below
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;extract-and-summarize&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;openai&lt;/span&gt;
  &lt;span class="na"&gt;task&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;TASK_TEXT_GENERATION&lt;/span&gt;
  &lt;span class="na"&gt;input&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;gpt-4o-mini&lt;/span&gt;
    &lt;span class="na"&gt;n&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;
    &lt;span class="na"&gt;prompt&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|-&lt;/span&gt;
      &lt;span class="s"&gt;You are given the content of a scraped website. Analyze the content and summarize the key insights that are relevant to the user's search query.&lt;/span&gt;

      &lt;span class="s"&gt;**Search Query**:&lt;/span&gt;
      &lt;span class="s"&gt;${variable.search-query}&lt;/span&gt;

      &lt;span class="s"&gt;**Website Content**:&lt;/span&gt;
      &lt;span class="s"&gt;${scraper.output.markdown}&lt;/span&gt;

      &lt;span class="s"&gt;**Website URL**:&lt;/span&gt;
      &lt;span class="s"&gt;${google.output.results[0].link}&lt;/span&gt;

      &lt;span class="s"&gt;Now generate your response, providing an output for each of the steps:&lt;/span&gt;
    &lt;span class="na"&gt;response-format&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;text&lt;/span&gt;
    &lt;span class="na"&gt;system-message&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|-&lt;/span&gt;
      &lt;span class="s"&gt;You are a helpful assistant.&lt;/span&gt;

      &lt;span class="s"&gt;Follow these steps and instructions to generate your response:&lt;/span&gt;
      &lt;span class="s"&gt;1. Write a brief summary of the content&lt;/span&gt;
      &lt;span class="s"&gt;2. Extract the title of the content&lt;/span&gt;
      &lt;span class="s"&gt;3. Identify the source (e.g., website name)&lt;/span&gt;
      &lt;span class="s"&gt;4. List the key insights from the content&lt;/span&gt;
      &lt;span class="s"&gt;5. Extract the author's name (if available)&lt;/span&gt;
      &lt;span class="s"&gt;6. Mention the published date (if available)&lt;/span&gt;
      &lt;span class="s"&gt;7. Identify any relevant keywords, tags or topics discussed&lt;/span&gt;
    &lt;span class="na"&gt;temperature&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;
    &lt;span class="na"&gt;top-p&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;
  &lt;span class="na"&gt;setup&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;api-key&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${secret.INSTILL_SECRET}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 6: Structure the output
&lt;/h2&gt;

&lt;p&gt;Add another OpenAI component to structure the output&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;set the model to use &lt;code&gt;gpt-4o-2024-08-06&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;set temperature to &lt;code&gt;0&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;set the response-fomat &amp;gt; type to &lt;code&gt;json_schema&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;add json-schema as shown below&lt;/li&gt;
&lt;li&gt;set the prompt as shown below
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;structure-response&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;openai&lt;/span&gt;
  &lt;span class="na"&gt;task&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;TASK_TEXT_GENERATION&lt;/span&gt;
  &lt;span class="na"&gt;input&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;gpt-4o-2024-08-06&lt;/span&gt;
    &lt;span class="na"&gt;n&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;
    &lt;span class="na"&gt;prompt&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|-&lt;/span&gt;
      &lt;span class="s"&gt;Extract from this content: ${extract-and-summarize.output.texts[0]}&lt;/span&gt;
      &lt;span class="s"&gt;URL: ${google.output.results[0].link}&lt;/span&gt;
    &lt;span class="na"&gt;response-format&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;json-schema&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
        &lt;span class="s"&gt;{&lt;/span&gt;
          &lt;span class="s"&gt;"name": "structured_content",&lt;/span&gt;
          &lt;span class="s"&gt;"description": "Extracts, summarizes and structures information from a webpage",&lt;/span&gt;
          &lt;span class="s"&gt;"strict": true,&lt;/span&gt;
          &lt;span class="s"&gt;"schema": {&lt;/span&gt;
            &lt;span class="s"&gt;"type": "object",&lt;/span&gt;
            &lt;span class="s"&gt;"properties": {&lt;/span&gt;
              &lt;span class="s"&gt;"summary": {&lt;/span&gt;
                &lt;span class="s"&gt;"type": "string",&lt;/span&gt;
                &lt;span class="s"&gt;"description": "A brief summary of the content"&lt;/span&gt;
              &lt;span class="s"&gt;},&lt;/span&gt;
              &lt;span class="s"&gt;"title": {&lt;/span&gt;
                &lt;span class="s"&gt;"type": "string",&lt;/span&gt;
                &lt;span class="s"&gt;"description": "Title of the webpage"&lt;/span&gt;
              &lt;span class="s"&gt;},&lt;/span&gt;
              &lt;span class="s"&gt;"url": {&lt;/span&gt;
                &lt;span class="s"&gt;"type": "string",&lt;/span&gt;
                &lt;span class="s"&gt;"description": "Webpage URL"&lt;/span&gt;
              &lt;span class="s"&gt;},&lt;/span&gt;
              &lt;span class="s"&gt;"source": {&lt;/span&gt;
                &lt;span class="s"&gt;"type": "string",&lt;/span&gt;
                &lt;span class="s"&gt;"description": "The source of the content (e.g., website name)"&lt;/span&gt;
              &lt;span class="s"&gt;},&lt;/span&gt;
              &lt;span class="s"&gt;"author": {&lt;/span&gt;
                &lt;span class="s"&gt;"type": "string",&lt;/span&gt;
                &lt;span class="s"&gt;"description": "Author's name (if available)"&lt;/span&gt;
              &lt;span class="s"&gt;},&lt;/span&gt;
              &lt;span class="s"&gt;"published_date": {&lt;/span&gt;
                &lt;span class="s"&gt;"type": "string",&lt;/span&gt;
                &lt;span class="s"&gt;"description": "Published data (if available)"&lt;/span&gt;
              &lt;span class="s"&gt;},&lt;/span&gt;
              &lt;span class="s"&gt;"tags": {&lt;/span&gt;
                &lt;span class="s"&gt;"type": "array",&lt;/span&gt;
                &lt;span class="s"&gt;"description": "Relevant keywords, tags or topics discussed",&lt;/span&gt;
                &lt;span class="s"&gt;"items": {&lt;/span&gt;
                  &lt;span class="s"&gt;"type": "string"&lt;/span&gt;
                &lt;span class="s"&gt;}&lt;/span&gt;
              &lt;span class="s"&gt;},&lt;/span&gt;
              &lt;span class="s"&gt;"key_insights": {&lt;/span&gt;
                &lt;span class="s"&gt;"type": "array",&lt;/span&gt;
                &lt;span class="s"&gt;"description": "A list of key insights from the content",&lt;/span&gt;
                &lt;span class="s"&gt;"items": {&lt;/span&gt;
                  &lt;span class="s"&gt;"type": "string"&lt;/span&gt;
                &lt;span class="s"&gt;}&lt;/span&gt;
              &lt;span class="s"&gt;}&lt;/span&gt;
            &lt;span class="s"&gt;},&lt;/span&gt;
            &lt;span class="s"&gt;"required": [&lt;/span&gt;
              &lt;span class="s"&gt;"summary",&lt;/span&gt;
              &lt;span class="s"&gt;"title",&lt;/span&gt;
              &lt;span class="s"&gt;"url",&lt;/span&gt;
              &lt;span class="s"&gt;"source",&lt;/span&gt;
              &lt;span class="s"&gt;"author",&lt;/span&gt;
              &lt;span class="s"&gt;"published_date",&lt;/span&gt;
              &lt;span class="s"&gt;"tags",&lt;/span&gt;
              &lt;span class="s"&gt;"key_insights"&lt;/span&gt;
            &lt;span class="s"&gt;],&lt;/span&gt;
            &lt;span class="s"&gt;"additionalProperties": false&lt;/span&gt;
          &lt;span class="s"&gt;}&lt;/span&gt;
        &lt;span class="s"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;json_schema&lt;/span&gt;
    &lt;span class="na"&gt;system-message&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;You are a helpful assistant.&lt;/span&gt;
    &lt;span class="na"&gt;temperature&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;
    &lt;span class="na"&gt;top-p&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;
  &lt;span class="na"&gt;setup&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;api-key&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${secret.INSTILL_SECRET}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add a JSON component to output the result as json&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;text-to-json&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;json&lt;/span&gt;
  &lt;span class="na"&gt;task&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;TASK_UNMARSHAL&lt;/span&gt;
  &lt;span class="na"&gt;input&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;string&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${structure-response.output.texts[0]}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, output the result by adding this to the end of the recipe&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;output&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;scraped-content&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Content&lt;/span&gt;
    &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${scraper.output.markdown}&lt;/span&gt;
  &lt;span class="na"&gt;structured-output&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Structured web-search summary&lt;/span&gt;
    &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${text-to-json.output.json}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 7: Run the pipeline
&lt;/h2&gt;

&lt;p&gt;There are a few ways you can run a pipeline, see &lt;a href="https://www.instill.tech/docs/vdp/run" rel="noopener noreferrer"&gt;Run Pipeline docs&lt;/a&gt;. &lt;/p&gt;

&lt;h3&gt;
  
  
  1. Run pipeline via editor
&lt;/h3&gt;

&lt;p&gt;In the Input form on the bottom right, fill in the corresponding values:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CSE ID: &amp;lt;Your Search Engine ID&amp;gt;
Search Query: What are the risks of lasik?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2hqjczmojzeq5v3vos60.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2hqjczmojzeq5v3vos60.png" alt="Run pipeline in editor" width="800" height="402"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Run pipeline via API
&lt;/h3&gt;

&lt;p&gt;To generate your Instill API Token, see the &lt;a href="https://www.instill.tech/docs/core/token" rel="noopener noreferrer"&gt;API Token Management docs&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;INSTILL_API_TOKEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'**********'&lt;/span&gt;

curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST &lt;span class="s1"&gt;'https://api.instill.tech/v1beta/organizations/instill-ai/pipelines/structured-web-insights/trigger'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--header&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--header&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer &lt;/span&gt;&lt;span class="nv"&gt;$INSTILL_API_TOKEN&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="nt"&gt;--data&lt;/span&gt; &lt;span class="s1"&gt;'{
  "inputs": [
    {
      "google-cse-id": &amp;lt;YOUR CSE ID&amp;gt;,
      "search-query": "What are the risks of lasik?"
    }
  ]
}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"outputs"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"scraped-content"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"LASIK eye surgery - Mayo Clinic&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;This content does not have an English version.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;This content does not have an Arabic version.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;[Print](http://www.mayoclinic.org/tests-procedures/lasik-eye-surgery/about/pac-20384774?p=1)&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;## Overview&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;![LASIK eye surgery](http://www.mayoclinic.org/-/media/kcms/gbs/patient-consumer/images/2016/05/05/15/20/mcdc7_lasik-6col.jpg)&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;LASIK surgery&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;Enlarge image&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;Close&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;### LASIK surgery&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;![LASIK eye surgery](http://www.mayoclinic.org/-/media/kcms/gbs/patient-consumer/images/2016/05/05/15/20/mcdc7_lasik-6col.jpg)&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;### LASIK surgery&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;During LASIK eye surgery, an eye surgeon creates a flap in the cornea — the transparent, dome-shaped surface of the eye that accounts for a large part of the eye's bending or refracting power (A). Then the surgeon uses a laser to reshape the cornea, which corrects the refraction problems in the eye (B). The flap is then put back in place (C).&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;LASIK eye surgery is the best known and most commonly performed laser refractive surgery to correct vision problems. Laser-assisted in situ keratomileusis (LASIK) can be an alternative to glasses or contact lenses.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;During LASIK surgery, a special type of cutting laser is used to change the shape of the cornea. The cornea is the dome-shaped clear tissue at the front of the eye.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;In eyes with typical vision, the cornea bends — or refracts — light precisely onto the retina at the back of the eye. But with nearsightedness, farsightedness or astigmatism, the light is bent incorrectly. This incorrect refraction causes blurred vision.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;Glasses or contact lenses can correct vision, but reshaping the cornea also provides the refraction needed to correct vision.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;### Products &amp;amp; Services&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;- [A Book: Mayo Clinic Guide to Better Vision](https://order.store.mayoclinic.com/flex/mmv/vison01/?utm_source=MC-DotOrg-PS&amp;amp;utm_medium=Link&amp;amp;utm_campaign=Vision-Book&amp;amp;utm_content=VIS)&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;## Why it's done&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;![Anatomy of the eye](http://www.mayoclinic.org/-/media/kcms/gbs/patient-consumer/images/2013/11/15/17/42/ds00230_-ds00233_-ds00254_-ds00527_-ds00528_-ds00786_-ds01128_-my00376_-my00491_-wl00010_im02853_r7_eyethu_jpg.jpg)&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;Anatomy of the eye&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;Enlarge image&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;Close&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;### Anatomy of the eye&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;![Anatomy of the eye](http://www.mayoclinic.org/-/media/kcms/gbs/patient-consumer/images/2013/11/15/17/42/ds00230_-ds00233_-ds00254_-ds00527_-ds00528_-ds00786_-ds01128_-my00376_-my00491_-wl00010_im02853_r7_eyethu_jpg.jpg)&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;### Anatomy of the eye&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;Your eye is a complex and compact structure measuring about 1 inch (2.5 centimeters) in diameter. It receives millions of pieces of information about the outside world, which are quickly processed by your brain.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;![Nearsightedness (myopia)](http://www.mayoclinic.org/-/media/kcms/gbs/patient-consumer/images/2014/02/24/18/41/r7_myopia.jpg)&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;Nearsightedness (myopia)&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;Enlarge image&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;Close&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;### Nearsightedness (myopia)&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;![Nearsightedness (myopia)](http://www.mayoclinic.org/-/media/kcms/gbs/patient-consumer/images/2014/02/24/18/41/r7_myopia.jpg)&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;### Nearsightedness (myopia)&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;With typical vision, an image is sharply focused onto the surface of the retina. In nearsightedness, the point of focus is in front of the retina, making distant objects appear blurry.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;![Farsightedness (hyperopia)](http://www.mayoclinic.org/-/media/kcms/gbs/patient-consumer/images/2013/11/15/17/38/ds00527_-my00376_im01545_r7_hyperopiathu_jpg.png)&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;Farsightedness (hyperopia)&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;Enlarge image&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;Close&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;### Farsightedness (hyperopia)&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;![Farsightedness (hyperopia)](http://www.mayoclinic.org/-/media/kcms/gbs/patient-consumer/images/2013/11/15/17/38/ds00527_-my00376_im01545_r7_hyperopiathu_jpg.png)&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;### Farsightedness (hyperopia)&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;With typical vision, an image is sharply focused onto the surface of the retina. In farsightedness, the point of focus falls behind the retina, making close-up objects appear blurry.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;LASIK surgery may be an option for the correction of these vision problems:&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;- **Nearsightedness, also called myopia.** In nearsightedness, your eyeball is slightly longer than typical or the cornea curves too sharply. This causes light rays to focus in front of the retina, which makes distant vision blurry. Objects that are close can be seen fairly clearly. But objects in the distance will be blurry.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- **Farsightedness, also called hyperopia.** In farsightedness, you have a shorter than average eyeball or a cornea that is too flat. This causes light to focus behind the retina instead of on it. This makes near vision, and sometimes distant vision, blurry.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- **Astigmatism.** In astigmatism, the cornea curves or flattens unevenly. This affects focus of near and distant vision.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;If you're considering LASIK surgery, you probably already wear glasses or contact lenses. Your eye doctor will talk with you about whether LASIK surgery or another similar refractive procedure is an option that will work for you.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;[Request an appointment](http://www.mayoclinic.org/appointments)&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;## Risks&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;Complications that result in a loss of vision are very rare. But certain side effects of LASIK eye surgery are common. These include dry eyes and temporary visual problems such as glare. These symptoms usually clear up after a few weeks or months. Few people consider them to be a long-term problem.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;Risks of LASIK surgery include:&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;- **Dry eyes.** LASIK surgery causes a temporary decrease in tear production. For the first six months or so after your surgery, your eyes may feel unusually dry as they heal. Dry eyes can reduce the quality of your vision.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;Your eye doctor might recommend eye drops for dry eyes. If you experience severe dry eyes, your eye doctor may recommend additional management, including tear drain plugs or medicated eye drops.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;- **Glare, halos and double vision.** You may have a hard time seeing at night after surgery. This usually lasts a few days to a few weeks. You might notice increased light sensitivity, glare, halos around bright lights or double vision.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;Even when a good visual result is measured under standard testing conditions, your vision in dim light (such as at dusk or in fog) may be reduced to a greater degree after the surgery than before the surgery.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;- **Undercorrections.** If the laser removes too little tissue from your eye, you won't get the clearer vision results you were hoping for. Undercorrections are more common for people who are nearsighted. You may need another LASIK procedure within a year to remove more tissue.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- **Overcorrections.** It's also possible that the laser will remove too much tissue from your eye. Overcorrections may be more difficult to fix than undercorrections.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- **Astigmatism.** Astigmatism can be caused by uneven tissue removal. It may require another surgery, glasses or contact lenses.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- **Flap problems.** Folding back or removing the flap from the front of your eye during surgery can cause complications, including infection and excess tears. The outermost corneal tissue layer may grow abnormally underneath the flap during the healing process.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- **Corneal ectasia.** Corneal ectasia, a condition in which the cornea is too thin and weak, is one of the more-serious complications. The abnormal cornea tissue is unable to maintain its shape, which can lead to cornea bulging and worsening vision.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- **Regression.** Regression is when your vision slowly changes back toward your original prescription. This is a less common complication.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- **Vision loss or changes.** Rarely, surgical complications can result in loss of vision. Some people also may not see as sharply or clearly as previously.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;### Conditions that increase risks&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;Certain health conditions can increase the risks associated with LASIK surgery or make the outcome less predictable.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;Doctors may not recommend laser refractive surgery for you if you have certain conditions, including:&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;- Autoimmune disorders, such as rheumatoid arthritis.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- A weakened immune system caused by immunosuppressive medications or HIV.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- Constantly dry eyes.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- Recent changes in vision due to medicines, hormonal changes, pregnancy, breastfeeding or age.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- Inflammation of the cornea, lid disorders, eye injuries or eye diseases, such as uveitis, herpes simplex affecting the eye area, glaucoma or cataracts.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- Disorders of the cornea, including keratoconus or corneal ectasia.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;LASIK surgery is usually not recommended if you:&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;- Have an eye disease that causes the cornea to thin and bulge, such as keratoconus.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- Have a family history of keratoconus or other corneal ectasia.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- Have good overall vision.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- Have severe nearsightedness.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- Have very large pupils or thin corneas.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- Have age-related eye changes that cause vision to be less clear.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- Participate in contact sports that may be associated with blows to the face.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;If you're considering LASIK surgery, talk to your doctor about your questions and concerns. Your doctor will discuss whether you're a candidate for the procedure or other similar procedures.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;## How you prepare&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;Steps you can take to prepare for surgery include:&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;- **Know what surgery may cost you.** LASIK surgery is usually considered elective surgery, so most insurance companies won't cover the cost of the surgery. Be prepared to pay out-of-pocket for your expenses.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- **Arrange for a ride home.** You'll need to have someone drive you to and from your place of surgery. Immediately after surgery, you might still feel the effects of medicine given to you before surgery, and your vision may be blurry.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- **Skip the eye makeup.** Don't use eye makeup, cream, perfumes or lotions on the day before and the day of your surgery. Your doctor may also tell you to clean your eyelashes daily or more often in the days leading up to surgery. This helps remove debris and lessens your risk of infection.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;## What you can expect&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;### Before the procedure&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;Long-term results from LASIK tend to be best in people who are carefully checked before surgery to see if they are good candidates for the procedure.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;If you wear contact lenses, you'll need to stop wearing them and wear only your glasses for at least a few weeks before your evaluation and surgery. This is because contact lenses can change the shape of your cornea. Your eye doctor will provide specific guidelines depending on the type of contacts you wear and how long you've been a contact lens wearer.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;During the evaluation, your eye doctor will ask about your medical and surgical history and give you a complete eye examination to check your vision and decide whether you can undergo the procedure safely.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;Your eye doctor will look for signs of:&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;- Eye infection.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- Inflammation.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- Dry eyes.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- Large pupils.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- High eye pressure.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;Your eye doctor will also measure your cornea, noting the shape, contour, thickness and any irregularities. Your eye doctor will check which areas of your cornea need reshaping and determine the exact amount of tissue to remove from your cornea.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;Doctors generally use wavefront-guided technology to check your eye in detail before LASIK surgery. In this test, a scanner creates a highly detailed chart, similar to a topographic map, of your eye. The more detailed the measurements, the more accurate your eye doctor can be in removing corneal tissue.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;Before surgery, your doctor will discuss the risks and benefits of LASIK surgery, what to expect before and after surgery, and any questions you may have.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;### During the procedure&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;LASIK surgery is usually completed in 30 minutes or less. During the procedure, you lie on your back in a reclining chair. You may be given medicine to help you relax. After numbing drops are placed in your eye, your doctor uses an instrument to hold your eyelids open.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;A suction ring is placed on your eye just before cutting the corneal flap. This may cause a feeling of pressure, and your vision may dim a little.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;Your eye surgeon uses a small blade or cutting laser to cut a small hinged flap away from the front of your eye. Folding back the flap allows your doctor to reach the part of your cornea to be reshaped.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;Using a programmed laser, your eye surgeon reshapes parts of your cornea. With each pulse of the laser beam, a tiny amount of corneal tissue is removed. After reshaping the cornea, the surgeon lays the flap back into place. The flap usually heals without stitches.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;During the surgery, you'll be asked to focus on a point of light. Staring at this light helps you keep your eye fixed while the laser reshapes your cornea. You may notice a distinct odor as the laser removes your corneal tissue. Some people describe smelling an odor similar to that of burning hair.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;If you need LASIK surgery in both eyes, doctors will generally do the procedure on the same day.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;#### Video: LASIK eye surgery&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;Show transcriptfor video Video: LASIK eye surgery&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;LASIK surgery is performed with a laser programmed to remove a defined amount of tissue from a part of your eye called the cornea.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;To begin, your doctor uses a special blade — or laser — to cut a flap on the top layer of your cornea, about the size of a contact lens. The flap allows access to the deeper layers of your eye.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;The laser is used again to flatten certain tissue or to make the tissue steeper, depending on your needs for corrected vision. Finally, the flap is folded back into place and will heal on its own.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;### After the procedure&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;Immediately after surgery, your eye might itch, feel gritty, burn and be watery. You'll probably have blurred vision. You generally will experience little pain, and you'll usually recover your vision quickly.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;You might be given pain medicine or eye drops to keep you comfortable for several hours after the procedure. Your eye doctor might also ask you to wear a shield over your eye at night until your eye heals.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;You'll be able to see after surgery, but your vision won't be clear right away. While vision after LASIK is generally good within a few days, it can be up to 2 to 3 months after your surgery before your eye heals completely and your vision stabilizes. Your chances for improved vision are based, in part, on how good your vision was before surgery.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;You'll have a follow-up appointment with your eye doctor 1 to 2 days after surgery. This is to see how your eye is healing and check for any complications. Plan for other follow-up appointments during the first six months after surgery as your doctor recommends.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;It might be a few weeks before you can start to use cosmetics around your eyes again. You also might have to wait several weeks before resuming strenuous contact sports, swimming or using hot tubs.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;Follow your doctor's recommendations about how soon you can resume your usual activities.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;## Results&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;LASIK often offers improved vision without the hassle of glasses or contact lenses. In general, you have a very good chance of achieving 20/40 vision or better after refractive surgery.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;More than 8 out of 10 people who've undergone LASIK refractive surgery no longer need to use their glasses or contact lenses for most of their activities.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;Your results depend on your specific refractive error and other factors. People with a low grade of nearsightedness tend to have the most success with refractive surgery. People with a high degree of nearsightedness or farsightedness along with astigmatism have less predictable results.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;In some cases, the surgery might result in undercorrection. If this happens, you might need another surgery to achieve the proper correction.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;Rarely, some people's eyes slowly return to the level of vision they had before surgery. This might happen due to certain conditions, such as problems with wound healing, hormonal imbalances or pregnancy. Sometimes this change in vision is due to another eye problem, such as a cataract. Talk with your doctor about any vision changes.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;[By Mayo Clinic Staff](http://www.mayoclinic.org/about-this-site/meet-our-medical-editors)&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;[LASIK eye surgery care at Mayo Clinic](http://www.mayoclinic.org/tests-procedures/lasik-eye-surgery/care-at-mayo-clinic/pcc-20384776)&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;[Request an appointment](http://www.mayoclinic.org/appointments)&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;[Doctors &amp;amp; Departments](http://www.mayoclinic.org/tests-procedures/lasik-eye-surgery/doctors-departments/pdc-20384775)&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;Aug. 02, 2023&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;[Print](http://www.mayoclinic.org/tests-procedures/lasik-eye-surgery/about/pac-20384774?p=1)&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;Show references&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;1. Stein HA, et al., eds. Refractive surgery: Today and the future. In: Ophthalmic Assistant. 11th ed. Elsevier; 2023. https://www.clinicalkey.com. Accessed April 5, 2023.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;2. AskMayoExpert. Refractive laser surgery (adult). Mayo Clinic; 2022.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;3. Yanoff M, et al., eds. Laser-assisted in situ keratomileusis (LASIK). In: Ophthalmology. 6th ed. Elsevier; 2023. https://www.clinicalkey.com. Accessed April 5, 2023.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;4. Surgery for refractive errors. National Eye Institute. https://www.nei.nih.gov/learn-about-eye-health/eye-conditions-and-diseases/refractive-errors/surgery-refractive-errors. Accessed April 5, 2023.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;5. When is LASIK not for me? U.S. Food and Drug Administration. https://www.fda.gov/medical-devices/lasik/when-lasik-not-me. Accessed March 22, 2023.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;6. What should I expect before, during, and after surgery? U.S. Food and Drug Administration. https://www.fda.gov/medical-devices/lasik/what-should-i-expect-during-and-after-surgery#top. Accessed March 22, 2023.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;7. Mannis MJ, et al., eds. LASIK for myopia. In: Cornea: Fundamentals, Diagnosis and Management. 5th ed. Elsevier; 2022. https://www.clinicalkey.com. Accessed April 5, 2023.&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;8. Chodnicki KD (expert opinion). Mayo Clinic. April 9, 2023.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;## Related&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;- [Anatomy of the eye](http://www.mayoclinic.org/healthy-lifestyle/adult-health/multimedia/anatomy-of-the-eye/img-20008178)&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- [Astigmatism](http://www.mayoclinic.org/diseases-conditions/astigmatism/symptoms-causes/syc-20353835)&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- [Considering LASIK surgery](http://www.mayoclinic.org/tests-procedures/lasik-eye-surgery/in-depth/lasik-surgery/art-20045751)&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- [Farsightedness](http://www.mayoclinic.org/diseases-conditions/farsightedness/symptoms-causes/syc-20372495)&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- [Farsightedness (hyperopia)](http://www.mayoclinic.org/tests-procedures/lasik-eye-surgery/multimedia/farsightedness-hyperopia/img-20006711)&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- [Illustration of LASIK eye surgery](http://www.mayoclinic.org/tests-procedures/lasik-eye-surgery/multimedia/illustration-of-lasik-eye-surgery/img-20007640)&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- [LASIK eye surgery](http://www.mayoclinic.org/tests-procedures/lasik-eye-surgery/multimedia/lasik-eye-surgery/vid-20084660)&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- [Nearsightedness](http://www.mayoclinic.org/diseases-conditions/nearsightedness/symptoms-causes/syc-20375556)&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- [Nearsightedness (myopia)](http://www.mayoclinic.org/tests-procedures/lasik-eye-surgery/multimedia/nearsightedness-myopia/img-20006068)&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- [Presbyopia](http://www.mayoclinic.org/diseases-conditions/presbyopia/symptoms-causes/syc-20363328)&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;Show more related content&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;### Products &amp;amp; Services&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;- [A Book: Mayo Clinic Guide to Better Vision](https://order.store.mayoclinic.com/flex/mmv/vison01/?utm_source=MC-DotOrg-PS&amp;amp;utm_medium=Link&amp;amp;utm_campaign=Vision-Book&amp;amp;utm_content=VIS)&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;## LASIK eye surgery&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;- [About](http://www.mayoclinic.org/tests-procedures/lasik-eye-surgery/about/pac-20384774)&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- [Doctors&lt;/span&gt;&lt;span class="se"&gt;\\\n\\\n&lt;/span&gt;&lt;span class="s2"&gt;&amp;amp;&lt;/span&gt;&lt;span class="se"&gt;\\\n\\\n&lt;/span&gt;&lt;span class="s2"&gt;Departments](http://www.mayoclinic.org/tests-procedures/lasik-eye-surgery/doctors-departments/pdc-20384775)&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- [Care at&lt;/span&gt;&lt;span class="se"&gt;\\\n\\\n&lt;/span&gt;&lt;span class="s2"&gt;Mayo&lt;/span&gt;&lt;span class="se"&gt;\\\n\\\n&lt;/span&gt;&lt;span class="s2"&gt;Clinic](http://www.mayoclinic.org/tests-procedures/lasik-eye-surgery/care-at-mayo-clinic/pcc-20384776)&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;Advertisement&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;Mayo Clinic does not endorse companies or products. Advertising revenue supports our not-for-profit mission.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;**Advertising &amp;amp; Sponsorship**&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;- [Policy](http://www.mayoclinic.org/about-this-site/advertising-sponsorship-policy)&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- [Opportunities](http://www.mayoclinic.org/about-this-site/advertising-sponsorship)&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- [Ad Choices](https://optout.aboutads.info/)&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;### Mayo Clinic Press&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;Check out these best-sellers and special offers on books and newsletters from [Mayo Clinic Press](https://mcpress.mayoclinic.org/?utm_source=MC-DotOrg-Text&amp;amp;utm_medium=Link&amp;amp;utm_campaign=MC-Press&amp;amp;utm_content=MCPRESS).&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;- [Mayo Clinic on Incontinence - Mayo Clinic PressMayo Clinic on Incontinence](https://order.store.mayoclinic.com/flex/mmv/incon01/?altkey=INMCPRC&amp;amp;utm_source=MC-DotOrg-Text&amp;amp;utm_medium=Link&amp;amp;utm_campaign=Incontinence-Book&amp;amp;utm_content=INC)&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- [The Essential Diabetes Book - Mayo Clinic PressThe Essential Diabetes Book](https://order.store.mayoclinic.com/flex/mmv/ESDIAB1/?altkey=ESMCPRC&amp;amp;utm_source=MC-DotOrg-Text&amp;amp;utm_medium=Link&amp;amp;utm_campaign=Diabetes-Book&amp;amp;utm_content=EDIAB)&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- [Mayo Clinic on Hearing and Balance - Mayo Clinic PressMayo Clinic on Hearing and Balance](https://order.store.mayoclinic.com/flex/mmv/HRBAL02/?altkey=HRMCPRC&amp;amp;utm_source=MC-DotOrg-Text&amp;amp;utm_medium=Link&amp;amp;utm_campaign=Hearing-Book&amp;amp;utm_content=HEAR)&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- [FREE Mayo Clinic Diet Assessment - Mayo Clinic PressFREE Mayo Clinic Diet Assessment](https://diet.mayoclinic.org/us/diet-assessment/diet-assessment/?profile=true&amp;amp;promo=65-qtr&amp;amp;utm_source=Mayo&amp;amp;utm_medium=Display&amp;amp;utm_campaign=text_link)&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- [Mayo Clinic Health Letter - FREE book - Mayo Clinic PressMayo Clinic Health Letter - FREE book](https://order.store.mayoclinic.com/hl/HLFREEB?utm_source=MC-DotOrg-Text&amp;amp;utm_medium=Link&amp;amp;utm_campaign=HealthLetter-Digital&amp;amp;utm_content=HL_FREEBOOK)&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;PRC-20194006&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;- [Patient Care &amp;amp; Health Information](http://www.mayoclinic.org/patient-care-and-health-information)&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- [Tests &amp;amp; Procedures](http://www.mayoclinic.org/tests-procedures)&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- LASIK eye surgery&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;![](https://assets.mayoclinic.org/content/dam/media/global/images/2023/11/14/giving-charity.svg)&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;## 5X Challenge&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;[Give Today](https://philanthropy.mayoclinic.org/page.aspx?pid=1833&amp;amp;sourcecode=24R081WI5MWV90Z24B&amp;amp;utm_source=devorgtilead&amp;amp;utm_medium=devweb&amp;amp;utm_campaign=dev5xchallenge)&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;Thanks to generous benefactors, your gift today can have 5X the impact to advance AI innovation at Mayo Clinic.&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="s2"&gt;[Give Today](https://philanthropy.mayoclinic.org/page.aspx?pid=1833&amp;amp;sourcecode=24R081WI5MWV90Z24B&amp;amp;utm_source=devorgtilead&amp;amp;utm_medium=devweb&amp;amp;utm_campaign=dev5xchallenge)"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"structured-output"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"author"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Mayo Clinic Staff"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"key_insights"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="s2"&gt;"LASIK is a common laser refractive surgery aimed at correcting vision problems such as nearsightedness, farsightedness, and astigmatism."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="s2"&gt;"Common side effects include dry eyes, glare, halos, and temporary visual disturbances, which usually resolve over time."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="s2"&gt;"Serious risks include undercorrections, overcorrections, astigmatism, flap complications, corneal ectasia, regression of vision, and rare cases of vision loss."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="s2"&gt;"Certain health conditions can increase the risks associated with LASIK, such as autoimmune disorders, dry eyes, and specific eye diseases."&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"published_date"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"August 02, 2023"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Mayo Clinic"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"summary"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"The content from the Mayo Clinic provides an overview of LASIK eye surgery, detailing the procedure, its purpose, and the potential risks involved. It highlights common side effects such as dry eyes, glare, and visual disturbances, as well as more serious complications like corneal ectasia and vision loss. The article also discusses conditions that may increase the risks associated with LASIK and emphasizes the importance of consulting with a doctor before proceeding with the surgery."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"tags"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="s2"&gt;"LASIK"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="s2"&gt;"eye surgery"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="s2"&gt;"vision correction"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="s2"&gt;"risks"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="s2"&gt;"side effects"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="s2"&gt;"nearsightedness"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="s2"&gt;"farsightedness"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="s2"&gt;"astigmatism"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="s2"&gt;"corneal ectasia"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="s2"&gt;"dry eyes"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="s2"&gt;"glare"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="s2"&gt;"visual disturbances"&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"LASIK eye surgery - Mayo Clinic"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://www.mayoclinic.org/tests-procedures/lasik-eye-surgery/about/pac-20384774"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"metadata"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="err"&gt;...&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's also easy to trigger these pipelines from a Python environment with our &lt;a href="https://www.instill.tech/docs/sdk/python" rel="noopener noreferrer"&gt;Python SDK&lt;/a&gt;, and you can launch an accompanying Colab notebook to this tutorial with the button below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://bit.ly/4gntymu" class="ltag_cta ltag_cta--branded" rel="noopener noreferrer"&gt;Try in Colab 🚀&lt;/a&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Tips &amp;amp; Learning Outcomes
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Prefer OpenAI's Structured Outputs single shot accuracy&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Generates valid JSON in one attempt, reducing API calls and saving resources&lt;/li&gt;
&lt;li&gt;More efficient than alternatives like Instructor, Marvin, or TypeChat&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Choose the Right Model&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;code&gt;gpt-4o-2024-08-06&lt;/code&gt; for complex schemas&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;gpt-4o-mini&lt;/code&gt; for simpler structures, saving costs and decreasing latency&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add helpful descriptions to each schema entry to improve final output accuracy&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"schema"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"object"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"properties"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"summary"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"string"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"A brief summary of the content"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;----&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;helpful&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;description&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;LLM&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;...&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Set temperature depending on your use case

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;0&lt;/code&gt; for deterministic outcomes, suitable for reasoning &amp;amp; structuring tasks&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;1&lt;/code&gt; for creative outcome variations, suitable for content generation tasks&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Finally, the pipeline we have built in this tutorial can be useful in various real-world applications, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Research Aggregation: Collecting information from multiple sources on a specific topic and presenting it in a clean, structured format can save time for users by providing a consolidated summary.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Market Intelligence: Businesses can use this to monitor competitors, trends, or pricing information across various sites, presented in a structured and actionable format.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;News Summarization: Journalists and media organizations could use such a tool to track breaking news or trending topics, summarized in a digestible, predefined structure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Sentiment Analysis: It can be applied to pull reviews, comments, or opinions from multiple sources (e.g., social media, forums), and present a structured sentiment analysis.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Data Extraction &amp;amp; Transformation: For legal, technical, or regulatory documents, such a pipeline could gather and organize content from trusted websites into structured legalese or a database.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Next steps
&lt;/h2&gt;

&lt;p&gt;Now that you've mastered building a pipeline with OpenAI's Structured Outputs, consider modifying this use case for more specific applications.&lt;/p&gt;

&lt;p&gt;For more ideas:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Visit the &lt;a href="https://www.instill.tech/docs/examples" rel="noopener noreferrer"&gt;Examples page&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Check out our &lt;a href="https://github.com/instill-ai/cookbook" rel="noopener noreferrer"&gt;cookbooks&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you have any questions or build anything cool, do share it with us on &lt;br&gt;
Discord or &lt;a href="https://x.com/instill_tech" rel="noopener noreferrer"&gt;@instill_tech&lt;/a&gt; on X/Twitter! &lt;/p&gt;

&lt;p&gt;&lt;a href="https://bit.ly/3A0NyL0" class="ltag_cta ltag_cta--branded" rel="noopener noreferrer"&gt;Join Discord ✨&lt;/a&gt;
&lt;/p&gt;

</description>
      <category>openai</category>
      <category>cloud</category>
      <category>website</category>
      <category>llm</category>
    </item>
    <item>
      <title>Modularity in AI: The Key to Robust Systems</title>
      <dc:creator>Anni Chen</dc:creator>
      <pubDate>Thu, 18 Jul 2024 14:29:27 +0000</pubDate>
      <link>https://dev.to/anni_in_tech/modularity-in-ai-the-key-to-robust-systems-15a5</link>
      <guid>https://dev.to/anni_in_tech/modularity-in-ai-the-key-to-robust-systems-15a5</guid>
      <description>&lt;p&gt;Hey devs! 👋 It's Anni, DevRel @ &lt;a href="https://www.instill.tech/" rel="noopener noreferrer"&gt;Instill AI&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We've just published a new blog post that might interest those of you working with AI or considering diving into the field.&lt;/p&gt;

&lt;p&gt;TL;DR&lt;/p&gt;

&lt;p&gt;AI isn't just about models. The full end-to-end product, including data ingestion, preprocessing, pipeline management, and model orchestration, is what drives real value.&lt;/p&gt;

&lt;p&gt;In this blog, we explore:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Why modularity is crucial in AI systems&lt;/li&gt;
&lt;li&gt;The components that make up a robust AI pipeline&lt;/li&gt;
&lt;li&gt;How to approach building scalable AI solutions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🔗 Read the full blog &lt;a href="https://bit.ly/46chUGy" rel="noopener noreferrer"&gt;https://bit.ly/46chUGy&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What's your take on this? Have you faced challenges in building end-to-end AI systems? &lt;/p&gt;

</description>
      <category>ai</category>
      <category>aiops</category>
      <category>datascience</category>
      <category>architecture</category>
    </item>
  </channel>
</rss>
