paint-brush
AIDataDoc: ChatGPT + Web Technologies - One File to Rule Them All (Open Source, Simple, Portable)by@robmccormack
New Story

AIDataDoc: ChatGPT + Web Technologies - One File to Rule Them All (Open Source, Simple, Portable)

by Rob McCormackAugust 18th, 2024
Read on Terminal Reader
Read this story w/o Javascript

Too Long; Didn't Read

AIDataDoc is an open-source tool that combines ChatGPT with web technologies in a single HTML file, enabling decentralized data analysis, easy sharing, and offline use. It's portable, user-friendly, and designed to simplify complex data tasks.
featured image - AIDataDoc: ChatGPT + Web Technologies - One File to Rule Them All (Open Source, Simple, Portable)
Rob McCormack HackerNoon profile picture

ChatGPT 4 or ChatGPT 4o is required. -Not recommended for use with ChatGPT 4o Mini


What if you could take your entire data analysis environment, complete with AI-powered insights, and share it with anyone, anywhere, with just a single file? AIDataDoc is the solution. This innovative open-source project eliminates the need for complex setups, cloud dependencies, and specialized software, bringing data analysis into the decentralized AI era.

What is AIDataDoc

  • a portable, open-source solution that combines AI instructions, AIMarkdown, JavaScript, HTML, and your dataset into a single, cohesive HTML document. This innovative blend of technologies empowers programmers and non-programmers to analyze data in previously unimaginable ways without AI. With AIDataDoc, you can effortlessly integrate multimedia and documentation and customize AI interactions for a seamless experience.
  • simplifies data management
  • empowers users to take their data anywhere, share it quickly, and even work offline, embodying the principles of decentralized AI.Use it on desktop or mobile devices.

In a Hurry?

  1. See it in action: Shared ChatGPT Session:
  1. You can get started immediately by playing around with this single HTML file - you can save it locally. All the instructions you need are in the HTML file.

Screenshots from iPhone 13

HTML file in Safari screenshot

ChatGPT chat session in ChatGPT app screenshot

How AIDataDoc Embraces Decentralized AI Principles:

  1. Data Ownership and Privacy: AIDataDoc allows users to retain complete control and ownership of their data by keeping it local within the HTML file, significantly enhancing privacy and reducing data breach risk.
  2. Peer-to-Peer Collaboration and Sharing: AIDataDoc's single-file format simplifies sharing and collaboration. Users can easily exchange AI-powered insights and data with others directly without relying on intermediaries or centralized platforms. A single file promotes a more open and collaborative environment for AI development and knowledge sharing, making the process as simple as sharing a file.
  3. Democratizing AI: An intuitive interface makes powerful AI capabilities accessible to users of all backgrounds and skill levels.

What is AIMarkdown Script?

AIDataDoc builds upon the capabilities of AIMarkdown Script, a powerful tool for orchestrating dynamic interactions with ChatGPT. It is designed to streamline AI communication, allowing you to control conversation flow, customize responses, and craft personalized AI experiences. Whether a seasoned coder seeking fine-grained control or a non-programmer looking for an intuitive interface, AIMarkdown Script bridges the gap, making complex AI interactions surprisingly simple.


Created by Rob McCormack in 2023, AIMarkdown Script combines YAML and Markdown with natural language instructions to guide AI behavior. YAML is a human-readable data serialization language designed for easy configuration and integration within various programming environments, emphasizing simplicity and flexibility. Markdown is a lightweight markup language that enables the straightforward formatting of text on the web. This approach not only makes script creation accessible but also allows for intricate customizations without the constraints of traditional programming languages.


For more information: https://aimarkdown.org

Note: AIMarkdown Script is currently in development and not natively supported by ChatGPT 4. Effective use requires clear instructions and potentially several iterations for fine-tuning applications. Future updates may include native support, significantly enhancing its utility.

Advantages of Using AIDataDoc with ChatGPT

Collaborative / Sharing:

  • Once you have finished analyzing data inside ChatGPT, you can share a ChatGPT session with others, showing them all the source material and everything you did with the data.


Portability:

  • The entire solution is contained within a single HTML file, making it easy to transport, share, and use across different devices and platforms.

  • Users can download and take the HTML file with embedded data anywhere, ensuring consistent access to their data and functionality.

  • Works on mobile devices.


Integration:

  • Combines the power of ChatGPT with JavaScript, HTML, and Markdown in one file, enabling complex data operations and interactions.

  • Facilitates seamless CRUD operations on CSV data using ChatGPT's capabilities directly within the HTML file.


Ease of Use:

  • Users can manipulate data using ChatGPT and then download the updated CSV file, insert it back into the HTML, and save it.

  • This process allows users to easily manage and update their data without additional software or complex workflows.


Local Data Management:

  • Once changes to the CSV file are copied and pasted into the local HTML, users can add or modify data locally without requiring internet access or cloud services.

  • This makes it ideal for scenarios where internet connectivity is limited, or data privacy is a concern.


Interactivity:

  • JavaScript within the HTML file can handle tasks such as data visualization and dynamic content generation, reducing the load on ChatGPT.

  • Enhances user experience by providing interactive features like tables, charts, and embedded videos.


Flexibility:

  • The solution can be easily customized and extended by modifying the HTML, JavaScript, or Markdown sections to fit specific user needs.

  • Users can incorporate additional functionalities or integrate other libraries and tools as required.


Open Source and MIT Licensed:

AIDataDoc is open source and released under the MIT license, which encourages community contributions and ensures that users can modify and distribute their versions.

Promotes innovation and collaboration within the community by providing a flexible and adaptable framework.


Customizable by Web Developers:

  • Web developers can customize JavaScript to perform various tasks with data, such as adding interactivity or data processing features.

  • The HTML file can include YouTube videos or other multimedia content to provide tutorials or further explanations to end users.


Backup File Inside of ChatGPT

Backups exist at the top of all previous ChatGPT sessions since all the AI instructions and the entire HTML source code were pasted in.


Markdown Utilization:

  • The output in ChatGPT can take advantage of Markdown, allowing for control over text formatting and images.

  • This ensures a clean, readable, and well-formatted presentation of data and instructions.


Simplicity and Portability:

  • The solution is straightforward to implement, making it accessible even to users who are not highly technical.

Its portability allows the sharing of complex data across different environments.


Serverless:

  • AIDataDoc operates without needing a server, reducing complexity and infrastructure costs.

  • This serverless approach enhances security and simplifies deployment.


Easy Backups:

  • The HTML file can be easily backed up by attaching it to an email, creating an immutable record with an email timestamp.

  • This method can also store the history of data changes, providing a simple and effective backup solution.


User-Friendly Data Query:

  • Other users can easily ask questions about the data using ChatGPT, making it a collaborative tool for data analysis and exploration.
  • Facilitates user interaction and data-driven decision-making by leveraging ChatGPT's natural language processing capabilities.

Intelligent Data Validation

  • ChatGPT can validate data entries in ways traditional applications cannot. For example, if you ask ChatGPT to add a record for a dog that is 78 years old, it will flag this as unusual and prompt the user for confirmation, explaining why this entry seems unusual.
  • Similarly, if a dog's color is green, ChatGPT will point out this error and ask for clarification, as green is not a natural color for dogs.
  • This intelligent validation helps maintain data accuracy and integrity by pointing out unusual or incorrect entries.

Case Study

Imagine this scenario:

  1. You have developed a database and want to leverage AI for in-depth analysis.
  2. You need various statistical analyses performed on the data, including generating insightful graphs.
  3. You want to ensure that data integrity goes beyond simple type validation, confirming that the data is logically sound and accurate.
  4. You would like to update and expand your dataset with data ChatGPT has updated, then export the revised version.
  5. You aim to share your notes, refined data, and relevant analysis in a single, self-contained file that doesn't require specialized software.
  6. You want to collaborate with a colleague, sharing the complete ChatGPT interactions and insights.
  7. You need a simple way to back up and share your database, ideally through a single email that attaches the AIDataDoc HTML file.
  8. You asked your boss for funding to hire a programmer. They responded, "Sorry, there's simply no budget for that. Good luck with it. We've found that external programmers are a continuing expense, and if you make changes, we have to keep paying them. Too bad you couldn't handle this yourself."


AIDataDoc makes all of these tasks possible for you to accomplish, all within a single, portable HTML document.

Sharing ChatGPT Chat Sessions

You can easily share your ChatGPT chat sessions by clicking on the sharing icon in ChatGPT to generate a URL. Copy this URL and paste it into the HTML document under Shared ChatGPT link:, then save the HTML file. The URL becomes a clickable link in the HTML file.


TIP:

You can use /summarize to get a summary of your chat session and the prompts you entered, making it easy for others to recreate your chat using their own ChatGPT.


Important Note:   Shared chat sessions will not include all elements from the original session. At the top of shared chats, you will see the following message:


This chat contains files or images produced by Advanced Data Analysis that are not yet visible in Shared Chats.


To work around this limitation, you can share your HTML file via email and attach any relevant images to the email along with the HTML file.

Steps for Sharing Chat Sessions with Images

Before Sending the Email:

  1. Use the /update command to see a copy of the latest CSV.
  2. Copy the updated CSV
  3. Paste the updated data into the AIDataDoc HTML file.
  4. Add any notes to the HTML file.
  5. Insert the shared URL into the HTML file.
  6. Save the HTML file.

Email Steps:

  1. Open your email program.
  2. Create a new email.
  3. Attach the revised HTML file to the email.
  4. In the original chat session, right-click on any generated images or graphs you want to include and select Copy image.
  5. Paste the images one at a time into the email.
  6. Add any additional notes to the email.
  7. Optionally, include the shared URL at the top of the email.
  8. Send the email.

Security Considerations

To address concerns about ChatGPT's data handling and the potential exposure of confidential information, you can perform your AIDataDoc analysis in a "Temporary Chat." After your analysis, copy and paste the pertinent data and notes into the AIDataDoc HTML file. This method guarantees that ChatGPT retains no memory of sensitive information, giving you complete control over how and where you share the final HTML file.

Securely Sharing AI Interactions / Chat Sessions

Since ChatGPT's Temporary Chat sessions cannot be shared you won't be able to provide a shareable link to your chat sessions and AI interactions. However, if you want to share part of your Temporary Chat session, you can follow simple copy them into your email (steps above).


With this technique, the email recipients could continue working and analyzing the data using their own ChatGPT temporary chat sessions.


While this is not a foolproof solution, it's a significant step towards enhancing privacy and data security when working with AI-powered tools like ChatGPT.

Going Further

External CSV File:

  • With ChatGPT's latest features, AIDataDoc can refer to an external CSV file, allowing users to upload and download data seamlessly.
  • The HTML file would reference this external file rather than relying on a textarea for data input.

Other database formats, such as JSON, could be used by re-writing the JavaScript in the HTML.


Connect to Google Drive or Microsoft OneDrive:

ChatGPT can connect to external data instead of copying and pasting CSV or uploading it to ChatGPT.


Server Version:

  • A server version of AIDataDoc could be created to add more ways to enter and manipulate data. This would enable advanced data operations, multi-user access, and integration with other web services, further enhancing AIDataDoc's flexibility and power.


Progressive Web App Version

  • Going further, a PWA could be developed for better off-grid use.

HTML Code

A Personal Note

As a software developer, I have always encountered two distinct challenges:

  1. Conceiving a creative idea that fulfills a genuine need.
  2. Bringing that idea to life through software development.


In the past, the daunting nature of software development often limited my creative exploration. AI has changed all that.


The progress with AI has indeed surprised me, but I wasn't prepared for how AI could motivate me to dream and take action. This newfound motivation sparked my interest in creating AIMarkdown Script and AIDataDoc. Through countless chat sessions, AI encouraged me to push these ideas forward, assisting with everything from coding and brainstorming to problem-solving. At age 70, I'm grateful for what AI has to offer. If I "wore a younger man's clothes," I can only imagine the possibilities that would lie ahead.


As a former programming professor, I would like to know what teaching with AI is like. AI would certainly motivate students.


Side note: When I added the personal note section to this article, Gemini had a curious response: That's a wonderful addition! It adds a personal touch and highlights the often-overlooked emotional and motivational aspects of AI's impact.

Conclusion

AIDataDoc represents a significant leap forward in AI data management and interactivity, providing a robust, portable, and customizable solution for users of all technical levels. By integrating ChatGPT with JavaScript, HTML, and Markdown, AIDataDoc offers a unique blend of simplicity and functionality, making complex data operations accessible and efficient. Whether a web developer looking to enhance your data-driven applications or a casual user needing a straightforward way to manage your data, AIDataDoc is the tool you’ve been waiting for.

Disclaimer: Use of AI

  1. Image Generation: The title image was created using ChatGPT 4o.
  2. Code Development: ChatGPT 4o was instrumental in developing the JavaScript code. The AIDataDoc project would not have been possible without AI assistance.
  3. Writing Assistance: Both ChatGPT and Gemini helped me write this article. Specifically, Gemini enhanced the conversational tone of the article. Grammarly made many corrections that ChatGPT and Gemini missed.