Since we began our careers in e-discovery in 1997, there’s always been a divide between project managers, who understand the business needs, and programmers, who build the technical solutions. Today, that gap is closing, thanks to generative AI tools like ChatGPT and Claude. These tools empower e-discovery professionals to take on tasks that previously required coding knowledge—whether it’s building a simple program, massaging a load file, or interacting with databases via APIs.

In the world of comics, Green Lantern wields a power ring that channels his creativity to conjure any object he can imagine, giving him an advantage in battling villains. His real strength and differentiator is his problem-solving ability, not just the power ring itself. Today’s e-discovery professionals can similarly use their creativity combined with generative AI to build impactful solutions. Think of generative AI tools as your own power ring, giving you the ability to create without needing a computer science degree.

In this article, we’ll show you how to use these tools to write your own computer program. This is just the start of your coding journey, assisted by the power of generative AI.
|

Generative AI: Your New Superpower

Generative AI, like ChatGPT and Claude, has the power to write entire programs from just a simple prompt. It can help you develop useful scripts, write SQL queries to interact with your databases, or even create full-blown applications—all without deep technical knowledge. Imagine needing to write an application to repeatedly transform different types of load files; you can start building that application today. This kind of capability bridges the gap between your e-discovery expertise and deep technical knowledge.
|

Key Terms to Know to Build Our App

Before we get started, here’s a glossary of key terms you’ll come across:

  1. Prompt: A prompt is a question or command given to an AI model to shape its response—whether a simple query or a specific coding instruction. Clear prompts = better results. 
  1. Programming Language: Programming languages are the core tools for creating software. Here’s a quick rundown: 
    • Python: Simple and versatile, ideal for data tasks and automation. 
    • C#: Powerful for Windows applications. 
    • Swift: Built for fast, efficient iOS and Mac apps. 
    • Pick based on your project—Python for data, Swift for iOS, etc. 
  1. IDE (Integrated Development Environment): An IDE is where you write, test, and debug code. New to coding? Try VS Code. For iOS or Mac, use Xcode. 
  1. GitHub Repositories (Repos): GitHub, a Microsoft platform, lets you save, share, and collaborate on code. A repository, or “repo,” is a dedicated project space where you store your code and files, allowing for version tracking and teamwork with other developers. 
  1. API (Application Programming Interface): APIs let programs talk to each other, often used to connect with databases or services.
|

Let’s Build Our First Application: The Data Organizer

Let’s start with a practical example. Imagine you have a list of documents with metadata contained within a text file, and you want to reorganize it by date. Using ChatGPT or Claude, you can create a simple Python script that allows you to import a file, sort the data, and display the results in a user-friendly console interface.

Prompt 1 (Python):

“Write a Python program that reads a text file containing document titles and dates, sorts the documents by date, and displays the sorted results in a nice, clear format in the console. Keep the program simple, using only basic Python libraries. Include helpful comments for each step.”

This prompt instructs the AI to produce a Python program that is clean, straightforward, and ready for direct use. The code should be formatted for a seamless copy-paste into an IDE, such as Google Colab, where it can run instantly. The design is intended to keep things intuitive and efficient, perfect for those who need a quick solution for sorting document data or as a foundation for more complex workflows.

You can view the code generated by GPT-4 in the following GitHub repo file:

https://github.com/LTProgrammer/eDiscovery/blob/main/reorganize_docs_by_date.py

If you’d like to understand each part of the code more deeply, you can ask the LLM to add a description for every line, explaining exactly what it does. Simply prompt it to write as detailed comments as you need, giving you full control over the level of insight.
|

Let’s Enhance Our Code

Prompt 2 (Python):

“Update the code with comments on every line explaining what it does to a beginner programmer.”

Voila! The code is now fully annotated with clear, beginner-friendly comments on each line. As someone who’s led development teams for years, I find this nothing short of amazing.

You can view the updated code generated by GPT-4 in the following GitHub repo file:

https://github.com/LTProgrammer/eDiscovery/blob/main/reorganize_docs_by_date_v2.py
|

Where to Build and Run Your Application

You can run this code in any IDE that supports Python, like Microsoft’s VS Code, or directly in an online Python environment such as Replit or Google Colab—no installation needed if you go the online route. If you encounter issues, just copy and paste any error messages into the LLM with a prompt like:

“Please see the errors from our code; can you update it to fix these errors so it runs?”

Want to add more options, like sorting by date, author, or subject? Update your prompt to request those features, and the LLM can take it from there.
|

Congratulations, You’re a Programmer!

You’ve just created your first e-discovery program from scratch! Like the Green Lantern, you’ve harnessed your creativity as a superpower, with generative AI as your guiding tool. Now, with these skills, you can build solutions, automate tasks, and open doors to endless possibilities. Remember, the only limit is your imagination—so keep experimenting, creating, and pushing boundaries.

Want to develop a desktop or iPhone app to share with friends or colleagues? Just prompt the LLM to write it in Swift or C#. Looking for a touch of elegance? Ask it to “create an interface in the style of an Apple app.”

The possibilities are yours to explore.

|

Save Your Code on GitHub for the E-Discovery Community

As you start building these small programs, we encourage you to save your work on GitHub. Here, you can share your scripts, collaborate with others, and see what others are building in the e-discovery community.

For the sample code above, we have it published in the following GitHub public repository:

https://github.com/LTProgrammer/eDiscovery

https://github.com/LTProgrammer/eDiscovery/blob/main/reorganize_docs_by_date.py

https://github.com/LTProgrammer/eDiscovery/blob/main/reorganize_docs_by_date_v2.py

Jay Leib and Ye Chen are industry veterans in e-discovery and technology innovation, having worked together in the field for 25 years. Jay is the chief strategy and innovation officer at Reveal, a leading AI company in e-discovery. Ye is the AI solution architect at Reveal, specializing in the integration of advanced machine learning techniques to streamline and enhance legal workflows. To reach the authors, or if you’d like to contribute to the e-discovery public GitHub repository, email: [email protected]