<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title><![CDATA[Sandra Gonzales - Elasticsearch Labs]]></title>
    <description><![CDATA[Articles and tutorials from the Search team at Elastic]]></description>
    <copyright><![CDATA[© 2026. Elasticsearch B.V. All Rights Reserved]]></copyright>
    <image>
      <title><![CDATA[Sandra Gonzales - Elasticsearch Labs]]></title>
      <url>https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/blt1121c0bf0e8a6e65/6a88da6340a1841030ef456f/search-labs-thumbnail.png</url>
      <link>https://www.elastic.co/search-labs/author/sandra-gonzales</link>
    </image>
    <link>https://www.elastic.co/search-labs/author/sandra-gonzales</link>
    <atom:link href="https://www.elastic.co/search-labs/rss/author/sandra-gonzales.xml" rel="self" type="application/rss+xml"/>
    <language><![CDATA[en]]></language>
    <lastBuildDate>Fri, 18 Sep 2026 18:49:44 GMT</lastBuildDate>
  <item>
    <title><![CDATA[ChatGPT and Elasticsearch: Creating custom GPTs with Elastic data]]></title>
    <description><![CDATA[Get started with custom GPTs using ChatGPT and Elasticsearch. Learn how to create custom GPTs that interact seamlessly with your Elasticsearch data.]]></description>
    <content:encoded><![CDATA[<p>ChatGPT Plus subscribers now have the opportunity to create their own customized versions of ChatGPT, known as <a href="https://openai.com/blog/introducing-gpts">GPTs</a>, replacing plugins as discussed in a <a href="https://www.elastic.co/search-labs/blog/chatgpt-elasticsearch-plugin-elastic-data">previous blog post</a>. Building upon a foundation from the <a href="https://www.elastic.co/search-labs/blog/chatgpt-elasticsearch-openai-meets-private-data">first installment of this series</a>—where we delved into setting up Elasticsearch data and creating vector embeddings in <a href="https://cloud.elastic.co/registration?onboarding_token=vectorsearch&amp;cta=cloud-registration&amp;tech=trial&amp;plcmt=article%20content&amp;pg=search-labs">Elastic Cloud</a>—this blog will guide you through the process of developing a custom GPT designed to interact seamlessly with your Elasticsearch data.</p><img src="https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/blt476976f187bd3697/6a17118ca6c2b920c3e797f0/00df7e59eea6ddfd3b07f4033e24c440ec896785-1416x1150.png" alt="screenshot of custom gpt in chatgpt interface" /><h2>Custom GPTs</h2><p>GPTs mark a significant advancement from the plugin system, offering an easier way for users to create custom versions of ChatGPT. Facilitated by an intuitive user interface, this enhancement simplifies the customization process, often eliminating the need for coding skills for a broad range of applications. Beyond basic personalization, those aiming to integrate ChatGPT with external data can do so through custom actions. Users have the option to share these tailored GPTs on the GPT store, keep them private for personal use, or only share them within your company’s workspace with the ChatGPT Team plan.</p><img src="https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/blt1dd762c84ba56010/6a17118ec1e8a59961f883bd/a168cd7373e33094ba22ee20843e5015f89437fa-1428x2538.png" alt="screenshot of gpt store in chatgpt interface" /><h2>How ChatGPT communicates with Elasticsearch</h2><img src="https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/blt5e1f6150f6b585ab/6a17118f8b73cbd5e118a127/2082b5c37896f56123ba834128f5aa36c5163f1b-1440x902.png" alt="illustration of architecture" /><ol><li><p>ChatGPT initiates a call to the <code>/search</code> endpoint in the Cloud Run service.</p></li><li><p>The service takes this input to create an Elasticsearch search request.</p></li><li><p>The query response with the documentation body and URL are returned to the service.</p></li><li><p>The service returns the document body and URL in text form to the custom ChatGPT.</p></li><li><p>This response is then relayed back to the GPT in text form, ready for interpretation.</p></li></ol><p>Again, this blog post assumes that you have set up your <a href="https://cloud.elastic.co/registration?onboarding_token=vectorsearch&amp;cta=cloud-registration&amp;tech=trial&amp;plcmt=article%20content&amp;pg=search-labs">Elastic Cloud</a> account, vectorized your content, and have an Elasticsearch cluster filled with data ready to be used. If you haven’t set all that up, see our <a href="https://www.elastic.co/search-labs/blog/chatgpt-elasticsearch-openai-meets-private-data">previous post</a> for detailed steps to follow.</p><h2>Code</h2><p>To bring our custom GPT to life, we create a service that acts as the intermediary between ChatGPT and our Elasticsearch data. The core of this service is a Python application which sets up a Quart app and defines the <code>/search</code> endpoint. In addition, we use a Dockerfile to facilitate the deployment of the app on Cloud Run.</p><p>The Python app connects to our Elastic Cloud cluster, executes a hybrid search combining BM25 and kNN queries, and returns the relevant documentation body and URL. This allows our custom GPT to access and utilize Elasticsearch data in real time.</p><p>For the complete code refer to the <a href="https://github.com/elastic/ElasticDocs_CustomGPT">GitHub repository</a>. This includes the Python app and the Dockerfile necessary for Cloud Run deployment.</p><h2>Deploy a service</h2><p>For detailed steps on deploying the service using Google Cloud Platform (GCP), refer to the <a href="https://www.elastic.co/search-labs/blog/chatgpt-elasticsearch-plugin-elastic-data#deploying-the-elastic-plugin-in-google-cloud-platform-gcp">deployment section in our previous blog post</a> on ChatGPT Plugins. There, you’ll find a step-by-step guide for setting up and deploying your service on GCP.</p><h2>Create a custom GPT</h2><p>After logging into your ChatGPT Plus account, navigate to “My GPTs” via your profile to find the “Create a GPT” link. Alternatively, the “Explore GPTs” section above your conversations also leads to the GPT store, where you can find a link to create a GPT.</p><img src="https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/blt7d285f4d5cab9105/6a1711912b835f5e44f4b303/1ac7ca63ef7fb3f63c1225b2d35f570d5b5a7bc4-1406x302.png" alt="screenshot of create a gpt button in chatgpt" /><h3>Configure the custom GPT</h3><p>The GPT editor provides two ways to configure your GPT: the "Create" tab for a guided setup through conversational prompts and the "Configure" tab for direct configuration input. For configuring the Elastic Docs Assistant, we'll primarily use manual configuration to precisely define our GPT's settings.</p><img src="https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/blt29c11c5416250a42/6a1711920e2e49050241a236/6f4329795f9f16246689a0c8e450cf46040e7a28-1440x1234.png" alt="screenshot of gpt editor in chatgpt" /><p>Assign a name to your GPT, such as “Elastic Docs Assistant,” and add a brief description highlighting its function.</p><p>Under instructions, define the primary role of your GPT and provide it with instructions on how to present information:</p>You are an Elasticsearch Docs Assistant.  Your function is to assist users with docs on Elastic products by querying the defined /search action. Answer the user's query using only the information from the /search action response. If the response contains no results, respond "I'm unable to answer the question based on the information I have from Elastic Docs." and nothing else.  Be sure to include the URL at the bottom of each response.
<p>Let’s switch to the “Create” tab and ask ChatGPT to generate conversation starters and a logo. Perhaps I’ll upload my own logo instead.</p><img src="https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/bltd9b3121bbc52543f/6a171194a6c2b94cdde797f4/5f4692207d02797db336d7e071fc158f6758aed0-1440x1278.png" alt="screenshot of gpt conversation editor in chatgpt" /><p>We won’t be uploading any knowledge files as all the data we use is in Elasticsearch. Instead, we'll define an action.</p><h3>Define an action</h3><p>This is where we connect our data to Elasticsearch. Clicking “Create a new action” will take us to the action editor.</p><p>First, I define my API key that I’m using in my endpoint service with a custom header name I set in my environment.</p><img src="https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/blta6000165bc041729/6a171195dc55ded100e00eed/9c5ca2d2fa4266982eccb0ef03f626acb8082b3d-740x710.png" alt="screenshot of api key editor in chatgpt" /><p>Then I copy in my OpenAPI specification:</p>openapi: 3.0.1
info:
  title: ElasticDocs_CustomGPT
  description: Retrieve information from the most recent Elastic documentation
  version: 'v1'
servers:
  - url: YOUR_SERVICE_URL
paths:
  /search:
    get:
      operationId: search
      summary: retrieves the document matching the query
      parameters:
      - in: query
        name: query
        schema:
            type: string
        description: use to filter relevant part of the elasticsearch documentation
      responses:
        "200":
          description: OK
<p>Upon entering this information our schema will be automatically validated and display a search action, with any errors in red. If everything looks good, this is where the preview pane becomes particularly useful. Not only can you test the action to confirm its functionality, but the assistant also provides debugging information about the request. This is helpful for refining your GPT’s responses based on the service's response.</p><img src="https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/blta65b77db6bd29180/6a17119714b270b574e3c6e1/912de55175b968f19a3d758b8b0e40e7e90471b8-1440x1010.png" alt="screenshot of chatgpt action editor" /><p>Further customization can be achieved by configuring the GPT instructions to dynamically modify its action requests, such as rewriting the user input before it's sent to the service or adding request query parameters based on some condition in the user input. This eliminates the need for traditional coding logic, assuming your endpoint is designed to support these modifications.</p><h3>Publish the custom GPT</h3><p>Click “Publish” in the top right corner above the preview pane to be taken to your newly created GPT.</p><img src="https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/blt476976f187bd3697/6a17118ca6c2b920c3e797f0/00df7e59eea6ddfd3b07f4033e24c440ec896785-1416x1150.png" alt="screenshot of custom gpt in chatgpt interface" /><h2>What's next for custom GPTs</h2><p>This exploration of Custom GPTs, leveraging Elasticsearch for dynamic, data-driven conversations, has only begun to reveal the potential of what's possible. By harnessing the power of ChatGPT's interface and connecting it to external data, we introduce a new dimension of customization and contextually rich interactions with state-of-the-art AI models.</p><p>You can try all of the capabilities discussed in this blog today! Get started by signing up for a <a href="https://cloud.elastic.co/registration?onboarding_token=vectorsearch&amp;cta=cloud-registration&amp;tech=trial&amp;plcmt=article%20content&amp;pg=search-labs">free Elastic Cloud trial</a>.</p><p><em>In this blog post, we may have used third party generative AI tools, which are owned and operated by their respective owners. Elastic does not have any control over the third party tools and we have no responsibility or liability for their content, operation or use, nor for any loss or damage that may arise from your use of such tools. Please exercise caution when using AI tools with personal, sensitive or confidential information. Any data you submit may be used for AI training or other purposes. There is no guarantee that information you provide will be kept secure or confidential. You should familiarize yourself with the privacy practices and terms of use of any generative AI tools prior to use.</em></p><p><em>Elastic, Elasticsearch and associated marks are trademarks, logos or registered trademarks of Elasticsearch N.V. in the United States and other countries. All other company and product names are trademarks, logos or registered trademarks of their respective owners.</em></p>]]></content:encoded>
    <link>https://www.elastic.co/search-labs/blog/chatgpt-elasticsearch-creating-custom-gpts-with-elastic-data</link>
    <guid isPermaLink="true">https://www.elastic.co/search-labs/blog/chatgpt-elasticsearch-creating-custom-gpts-with-elastic-data</guid>
    <category><![CDATA[AI]]></category>
    <dc:creator><![CDATA[Sandra Gonzales]]></dc:creator>
    <enclosure url="https://static-www.elastic.co/v3/assets/bltefdd0b53724fa2ce/blt9839a0a8271bf582/6a171199ab7f088457db9fa7/bd6a04b5eac462c2096f6b27aeef58847159595d-1128x1020.png" length="0" type="image/png"/>
    <pubDate>Fri, 12 Apr 2024 00:00:00 GMT</pubDate>
  </item>
  </channel>
</rss>