Dangs Explorer: Turning this wordpress blog into travel specialist ChatGPT

https://chat.openai.com/g/g-cD3JPW44f-dangs-explorer

Try the custom GPT above

Since the ever popular chatbot ChatGPT was launched in Nov 2022, I started to follow the world of LLMs. After the launch of GPT 4, I not only started to follow but also started to use it on a daily basis. The primary use case for me is to get help with coding and to talk to it when I am walking or running.

I wanted to try out the recently launched capabilities and GPTs. They were announced at the OpenAI DevDay.

I had two ideas to create my own GPT,

  • A. Export all my diary entries and add them to the GPT knowledge
  • B. Export all my travel blog entries and add them to the GPT knowledge

Then I realized that in Option A, the knowledge that I upload can be spurted out by the GPT in case of user query. I figured I’d do the Option B and share that GPT publicly as my blog entries are already public.


Idea

I’ve written extensively about Dang area of Gujarat, India. My hometown Vansda is near to Dang so I explored and documented a lot of scenic places in 2015 – 2018 timeframe.

Idea is to feed all 120 blog posts written in travel category to the GPT’s knowledge.

The hope? My “Dangs Explorer” GPT would become an expert travel advisor for Dang.

Blog data export

The first step is to get the data exported from my blog to my GPT. My blog is hosted on WordPress platform and WordPress makes it very easy to get an export XML file. The export took 1 min.

darpandodiya.WordPress.2023-11-24.xml


Darpan Dodiya
https://darpan.blog

Fri, 24 Nov 2023 23:37:20 +0000
en-US
1.2
https://darpan.blog
https://darpan.blog

    <wp:author><wp:author_id>1</wp:author_id><wp:author_login><![CDATA[ddadmin]]></wp:author_login><wp:author_email><![CDATA[[email protected]]]></wp:author_email><wp:author_display_name><![CDATA[Darpan]]></wp:author_display_name><wp:author_first_name><![CDATA[Darpan]]></wp:author_first_name><wp:author_last_name><![CDATA[]]></wp:author_last_name></wp:author>

    <wp:category>
    <wp:term_id>3</wp:term_id>
    <wp:category_nicename><![CDATA[travel]]></wp:category_nicename>
    <wp:category_parent><![CDATA[]]></wp:category_parent>
    <wp:cat_name><![CDATA[Travel]]></wp:cat_name>
</wp:category>

<generator>https://wordpress.org/?v=6.4.1</generator>

https://darpan.blog/wp-content/uploads/2016/06/favicon.ico Darpan Dodiya https://darpan.blog 32 32
75705847

<![CDATA[You Mean APJ Abdul Kalam? The Scientist?]]>
https://darpan.blog/travel/you-mean-apj-abdul-kalam-the-scientist/
Sat, 27 Dec 2014 17:22:05 +0000

http://www.darpandodiya.com/?p=295

<![CDATA[Foreigners might be incognisant about the Indian superstars, Rajnikanth, Shahrukh Khan, Aishwarya Rai or the likes of Ratan Tata, Dhirubhai Ambani but they do know Abdul Kalam.

I was in Mumbai for a short sightseeing tour. On one exquisite morning I attained the famous Dhobi Ghat, Mahalaxmi. There, I happened to have a splendid conversation with a Brazilian couple that included themes of all matters. In the niche of Indian politics and corruption, I asked them casually,
” Then you must be knowing Narendra Modi? “
[After some expressionless look] No.

Creation of GPT

This part is quite easy as well, https://chat.openai.com/gpts/editor guided on what to do, it generated the GPT image using DALL-E after I initial data gathering.

Feeding the knowledge

Attempt 1, failed: Feeding the xml darpandodiya.WordPress.2023-11-24.xml directly

XML had complex structure (and possibly quite large in size because of lots of metadata). GPT tried to use the Code Interpreter to parse through it and retrieve information, but it kept failing.

To simplify the data knowledge, I thought to convert XML to JSON format.

Attempt 2, mind blown: Creating JSON and PDF from XML

This XML to JSON conversion would’ve taken me at least an hour without ChatGPT. I’d write some hacky Python code to go through XML, extract information and output JSON.

But now with the code interpreter capabilities, I uploaded XML into the chat and asked ChatGPT to convert it into JSON. It faced issues with character encodings but after some back and forth, I was blown away by the output, that too in PDF. As mentioned earlier, if I had to code the PDF conversion too, it would’ve taken me 1-2 hours at least to figure out all the details.

Attempt 3: It works! Feeding the JSON to the GPT knowledge.

I added the json to the Knowledge of my GPT, did some more prompt tuning and things started working as expected.


Takeaways

  • Given original content, it is stupidly easy to create useful and effective Custom GPTs
  • As a programmer, I am 1% nervous but 99% cheerful in the fact that ChatGPT can help with trivial -but- time consuming programming work

Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *