The Complete Obsolete Guide to Generative AI cover
welcome to this free extract from
an online version of the Manning book.
to read more
or

3 Creating text and code

 

This chapter covers

  • Automating the process of filtering content for accuracy
  • Creating new content based on complex details you can define
  • Generating customized documentation matching specialized fields
  • Generating programming code

Until now we’ve explored some of the underlying context and mechanics of generative AI: how it works and how you can fine-tune it. Beginning with this chapter, we’ll be working with some actual content generation.

But how exactly is that going to work? Well, I don’t see much point in me throwing you a long list of ChatGPT prompts. I’m sure you’ve already done plenty of that. And in case you haven’t, typing “cool prompts for ChatGPT” into your favorite internet search engine will soon fix you up.

What I am going to give you is some more complex and sometimes unexpected approaches to dealing with bigger problems, including how to train your AI model to work within a closely defined conceptual universe and how to build real-world websites just by describing them. We’re going to use all the same toys everyone else is playing with, but we’re going to be tweaking things to better fit our specific needs.

NOTE

One caveat. As I’ll point out more than once in the coming chapters, I don’t expect you to use the tricks and configurations we’ll encounter exactly the way I’m presenting them. Rather, the goal is to provide some basic skills and to inspire your curiosity and creativity so you’ll see new solutions to your problems.

Automating accuracy checking

Creating new contextually aware content

Setting up your environment for Python

Creating your prompt (using Python)

Generating specialized documents

Generating programming code

Interactive coding with Copilot

Try this for yourself

Summary