{"id":174,"date":"2023-11-15T14:45:43","date_gmt":"2023-11-15T19:45:43","guid":{"rendered":"https:\/\/carleton.ca\/xlab\/?p=174"},"modified":"2023-11-15T14:45:43","modified_gmt":"2023-11-15T19:45:43","slug":"notes-on-building-a-gpt-agent-with-openai","status":"publish","type":"post","link":"https:\/\/carleton.ca\/xlab\/2023\/notes-on-building-a-gpt-agent-with-openai\/","title":{"rendered":"Notes on Building a GPT Agent with OpenAI"},"content":{"rendered":"<p>OpenAI has recently unveiled a new feature, where you can customize an underlying GPT model to become a kind of agent for you. To do this, you have to have the $20 a month subscription, or have paid access to the API. If you only have API access, you can build in the sandbox (and presumably deploy from there?) but with reduced capabilities. If you build using the interface via chat.openai.com, you get a chat interface for customizing your bot (I&#8217;ll just call these things bots for now) &#8211; it asks you questions about the kind of capabilities you want, you tell it, and you&#8217;re off to the races.<\/p>\n<p>In practice, I&#8217;m finding there are many little gotchas.<\/p>\n<ul>\n<li>in the &#8216;configure&#8217; screen, you can also upload files to specify background knowledge that the bot should draw on. If you upload more than ten files, all hell breaks lose<\/li>\n<li>if you update your bot&#8217;s instructions via the chat, previous instructions seem to be forgotten.<\/li>\n<\/ul>\n<p>So I do all my updating via the &#8216;configure&#8217; tab and the &#8216;instructions&#8217; box. I&#8217;ve also flipped the switches for image generation, code, and&#8230;<\/p>\n<p>I thought it might be interesting to have a bot that assists with some archaeological tasks. I&#8217;ve given it very particular instructions on how to interpret geophysical data (resistitivity, magnetometery, gpr), how to query Open Context, and how to generate Harris Matrices. You can even upload a csv of data and tell it which archaeological statistic you wish it to calculate &#8211; and it does.<\/p>\n<p>Is it right every single time? Things that it&#8217;s probably encountered in its training &#8211; like coding statistics &#8211; it seems very good at. Section drawings that are very clean and clear? It does better with simpler ones (so do we all) but it&#8217;s pretty good. More complex drawings, like this one:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"size-medium wp-image-175 aligncenter\" src=\"https:\/\/carleton.ca\/xlab\/wp-content\/uploads\/Screen-Shot-2023-11-15-at-2.01.35-PM-240x66.png\" alt=\"\" width=\"240\" height=\"66\" srcset=\"https:\/\/carleton.ca\/xlab\/wp-content\/uploads\/Screen-Shot-2023-11-15-at-2.01.35-PM-240x66.png 240w, https:\/\/carleton.ca\/xlab\/wp-content\/uploads\/Screen-Shot-2023-11-15-at-2.01.35-PM-400x110.png 400w, https:\/\/carleton.ca\/xlab\/wp-content\/uploads\/Screen-Shot-2023-11-15-at-2.01.35-PM-160x44.png 160w, https:\/\/carleton.ca\/xlab\/wp-content\/uploads\/Screen-Shot-2023-11-15-at-2.01.35-PM-768x211.png 768w, https:\/\/carleton.ca\/xlab\/wp-content\/uploads\/Screen-Shot-2023-11-15-at-2.01.35-PM-360x99.png 360w, https:\/\/carleton.ca\/xlab\/wp-content\/uploads\/Screen-Shot-2023-11-15-at-2.01.35-PM.png 1158w\" sizes=\"(max-width: 240px) 100vw, 240px\" \/><\/p>\n<p>(<a href=\"https:\/\/artiraq.org\/static\/opencontext\/poggio-civitate\/tb-scans-2017\/preview\/mswilcoxv--282-283insert.jpg\">click here for a larger version<\/a>)<\/p>\n<div class=\"card-body\">\n<p class=\"card-text\">Anthony Tuck. (2017) &#8220;<span id=\"item_title\">Trench Book MW V:282 from Europe\/Italy\/Poggio Civitate\/Tesoro\/Tesoro 26\/1989, ID:430<\/span>&#8220;. In <em>Murlo<\/em>. Anthony Tuck (Ed). Released: 2017-10-04. Open Context. &lt;<a href=\"https:\/\/opencontext.org\/media\/7368e5e6-893f-4dd9-978f-e9727b9babc5\"><span id=\"item_uri\" class=\"cite_id\">https:\/\/opencontext.org\/media\/7368e5e6-893f-4dd9-978f-e9727b9babc5<\/span><\/a>&gt; ARK (Archive): <a href=\"https:\/\/n2t.net\/ark:\/28722\/k2xw4qd2h\"><span class=\"cite_id\">https:\/\/n2t.net\/ark:\/28722\/k2xw4qd2h\u00a0<\/span><\/a><\/p>\n<p>&#8230;cause it a bit of grief, but stuff like this:<a href=\"https:\/\/cdn.masto.host\/scholarsocial\/media_attachments\/files\/111\/416\/007\/705\/320\/619\/original\/1dc776185f5b4adc.png\"><br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"alignleft\" src=\"https:\/\/cdn.masto.host\/scholarsocial\/media_attachments\/files\/111\/416\/007\/705\/320\/619\/original\/1dc776185f5b4adc.png\" width=\"377\" height=\"659\" \/><img decoding=\"async\" loading=\"lazy\" class=\"alignnone \" src=\"https:\/\/cdn.masto.host\/scholarsocial\/media_attachments\/files\/111\/416\/016\/500\/045\/242\/original\/a9e68c036ee3fb1a.png\" width=\"589\" height=\"352\" \/><\/a><\/p>\n<\/div>\n<p>Well, not a problem! Anyway, I continue to explore to try to work out the guardrails for use; not for knowledge generation, but places where the fundamental action of a gpt &#8211; the production of reasonable looking text in response to a prompt &#8211; leads to useful information.<\/p>\n<p>Experiments with magnetometry\u00a0<em>almost\u00a0<\/em>worked; early on in the process I gave the bot an image of magnetometric results and it tried to enhance linear features&#8230; indeed, it tries to enhance linear features for every use case, which isn&#8217;t what I&#8217;m after. Anyway. Stay tuned if you&#8217;re interested in this kind of thing.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>OpenAI has recently unveiled a new feature, where you can customize an underlying GPT model to become a kind of agent for you. To do this, you have to have the $20 a month subscription, or have paid access to the API. If you only have API access, you can build in the sandbox (and [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_relevanssi_hide_post":"","_relevanssi_hide_content":"","_relevanssi_pin_for_all":"","_relevanssi_pin_keywords":"","_relevanssi_unpin_keywords":"","_relevanssi_related_keywords":"","_relevanssi_related_include_ids":"","_relevanssi_related_exclude_ids":"","_relevanssi_related_no_append":"","_relevanssi_related_not_related":"","_relevanssi_related_posts":"","_relevanssi_noindex_reason":"","_mi_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":"","_links_to":"","_links_to_target":""},"categories":[1],"tags":[79],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Notes on Building a GPT Agent with OpenAI - X-Lab<\/title>\n<meta name=\"description\" content=\"OpenAI has recently unveiled a new feature, where you can customize an underlying GPT model to become a kind of agent for you. To do this, you have to\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/carleton.ca\/xlab\/2023\/notes-on-building-a-gpt-agent-with-openai\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"shawngraham\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/carleton.ca\/xlab\/2023\/notes-on-building-a-gpt-agent-with-openai\/\",\"url\":\"https:\/\/carleton.ca\/xlab\/2023\/notes-on-building-a-gpt-agent-with-openai\/\",\"name\":\"Notes on Building a GPT Agent with OpenAI - X-Lab\",\"isPartOf\":{\"@id\":\"https:\/\/carleton.ca\/xlab\/#website\"},\"datePublished\":\"2023-11-15T19:45:43+00:00\",\"dateModified\":\"2023-11-15T19:45:43+00:00\",\"author\":{\"@id\":\"https:\/\/carleton.ca\/xlab\/#\/schema\/person\/e8707158a71e77734ea13346b6e46feb\"},\"description\":\"OpenAI has recently unveiled a new feature, where you can customize an underlying GPT model to become a kind of agent for you. To do this, you have to\",\"breadcrumb\":{\"@id\":\"https:\/\/carleton.ca\/xlab\/2023\/notes-on-building-a-gpt-agent-with-openai\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/carleton.ca\/xlab\/2023\/notes-on-building-a-gpt-agent-with-openai\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/carleton.ca\/xlab\/2023\/notes-on-building-a-gpt-agent-with-openai\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/carleton.ca\/xlab\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"News\",\"item\":\"https:\/\/carleton.ca\/xlab\/category\/news\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Notes on Building a GPT Agent with OpenAI\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/carleton.ca\/xlab\/#website\",\"url\":\"https:\/\/carleton.ca\/xlab\/\",\"name\":\"X-Lab\",\"description\":\"Carleton University\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/carleton.ca\/xlab\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/carleton.ca\/xlab\/#\/schema\/person\/e8707158a71e77734ea13346b6e46feb\",\"name\":\"shawngraham\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/carleton.ca\/xlab\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1b4be5c0f305aa12c7a3dd75ae5c731e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1b4be5c0f305aa12c7a3dd75ae5c731e?s=96&d=mm&r=g\",\"caption\":\"shawngraham\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Notes on Building a GPT Agent with OpenAI - X-Lab","description":"OpenAI has recently unveiled a new feature, where you can customize an underlying GPT model to become a kind of agent for you. To do this, you have to","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/carleton.ca\/xlab\/2023\/notes-on-building-a-gpt-agent-with-openai\/","twitter_misc":{"Written by":"shawngraham","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/carleton.ca\/xlab\/2023\/notes-on-building-a-gpt-agent-with-openai\/","url":"https:\/\/carleton.ca\/xlab\/2023\/notes-on-building-a-gpt-agent-with-openai\/","name":"Notes on Building a GPT Agent with OpenAI - X-Lab","isPartOf":{"@id":"https:\/\/carleton.ca\/xlab\/#website"},"datePublished":"2023-11-15T19:45:43+00:00","dateModified":"2023-11-15T19:45:43+00:00","author":{"@id":"https:\/\/carleton.ca\/xlab\/#\/schema\/person\/e8707158a71e77734ea13346b6e46feb"},"description":"OpenAI has recently unveiled a new feature, where you can customize an underlying GPT model to become a kind of agent for you. To do this, you have to","breadcrumb":{"@id":"https:\/\/carleton.ca\/xlab\/2023\/notes-on-building-a-gpt-agent-with-openai\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/carleton.ca\/xlab\/2023\/notes-on-building-a-gpt-agent-with-openai\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/carleton.ca\/xlab\/2023\/notes-on-building-a-gpt-agent-with-openai\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/carleton.ca\/xlab\/"},{"@type":"ListItem","position":2,"name":"News","item":"https:\/\/carleton.ca\/xlab\/category\/news\/"},{"@type":"ListItem","position":3,"name":"Notes on Building a GPT Agent with OpenAI"}]},{"@type":"WebSite","@id":"https:\/\/carleton.ca\/xlab\/#website","url":"https:\/\/carleton.ca\/xlab\/","name":"X-Lab","description":"Carleton University","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/carleton.ca\/xlab\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/carleton.ca\/xlab\/#\/schema\/person\/e8707158a71e77734ea13346b6e46feb","name":"shawngraham","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/carleton.ca\/xlab\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/1b4be5c0f305aa12c7a3dd75ae5c731e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1b4be5c0f305aa12c7a3dd75ae5c731e?s=96&d=mm&r=g","caption":"shawngraham"}}]}},"acf":{"Post Thumbnail Icon":"","Post Thumbnail":false},"_links":{"self":[{"href":"https:\/\/carleton.ca\/xlab\/wp-json\/wp\/v2\/posts\/174"}],"collection":[{"href":"https:\/\/carleton.ca\/xlab\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/carleton.ca\/xlab\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/carleton.ca\/xlab\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/carleton.ca\/xlab\/wp-json\/wp\/v2\/comments?post=174"}],"version-history":[{"count":1,"href":"https:\/\/carleton.ca\/xlab\/wp-json\/wp\/v2\/posts\/174\/revisions"}],"predecessor-version":[{"id":176,"href":"https:\/\/carleton.ca\/xlab\/wp-json\/wp\/v2\/posts\/174\/revisions\/176"}],"wp:attachment":[{"href":"https:\/\/carleton.ca\/xlab\/wp-json\/wp\/v2\/media?parent=174"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/carleton.ca\/xlab\/wp-json\/wp\/v2\/categories?post=174"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/carleton.ca\/xlab\/wp-json\/wp\/v2\/tags?post=174"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}