In the previous chapter, Ecosystem & Monetization, we discussed how an open-source project can sustain itself financially through courses and sponsorships.
But this raises a big question: "If I give my code away for free, can people steal it?"
Welcome to Chapter 13: License.
This is the final piece of the puzzle. A license is the legal "rulebook" that tells the world exactly what they can and cannot do with your hard work. It turns a folder of files into a legally protected open-source project.
Imagine you invent a delicious cookie recipe and post it on a bulletin board.
The Problem: Someone takes your recipe, bakes the cookies, and sells them at a bakery. Another person takes the recipe, changes one ingredient, and claims they invented it. Without a written rule, you might feel cheated, or they might be afraid to use your recipe at all because they don't want to get in trouble.
The Solution: You pin a note to the recipe: "You can bake these, sell them, or change them. You just have to say the original recipe came from me."
In the software world, this note is called a License. The Prompt Engineering Guide uses the MIT License, which is one of the most popular and permissive "notes" in the world.
The MIT License is very short and simple. It boils down to three main points:
Let's look at a concrete example of how this license empowers other developers.
Goal: A developer named Sarah wants to build a mobile app called "AI Tutor." She wants to use the text from the Techniques chapter of this guide inside her app. She plans to charge $5 for the app.
Is this allowed? Yes! Because of the MIT License.
How Sarah complies with the License:
Everyone wins. This is the power of Open Source.
LICENSE FileWhere does this legal magic live? It isn't hidden in a government vault. It is just a text file sitting in the main folder of the project.
When you create a repository on GitHub, you usually add this file alongside README.md.
Here is what happens when a user visits the repository to see if they can use the code:
Let's look at the actual content of the file. It is a standard template. You don't need a lawyer to write it; you just copy the standard MIT text and change the year and name.
LICENSE
This file is located at the very root of the project (next to package.json and next.config.js).
MIT License
Copyright (c) 2023 DAIR.AI
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction...
Breakdown of the Text:
Copyright (c) 2023 DAIR.AI. This asserts who wrote it....to deal in the Software without restriction. This grants freedom.The above copyright notice... shall be included in all copies. This ensures credit is kept.The file ends with a section usually written in ALL CAPS.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND...
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM...
This is the "Safety Shield." Since DAIR.AI is giving this away for free, they cannot be held responsible if a bank uses the Risks & Misuses chapter and still gets hacked. The user accepts the risk.
While the License handles the legal right to use the code, the Citation (which we set up in Configuration Files) handles the academic credit.
Together, these two files protect the creators while enabling the community.
In this final chapter, we explored the License.
LICENSE in the root directory.Congratulations! You have navigated the entire architecture of the Prompt Engineering Guide.
You now understand not just how to prompt, but how to build a massive, collaborative, multi-lingual documentation platform to teach the world.
Whether you are here to learn how to talk to AI, or here to contribute code to the repository: Welcome to the community.
Generated by Code IQ