Search This Blog

Showing posts with label AI. Show all posts
Showing posts with label AI. Show all posts

Wednesday, January 29, 2025

AI: Prompt Engineering

The other day I got an advertising on social media about a free certificate in responsible AI use and Prompt Engineering. The course was a collaboration between Microsoft and Founderz who hosted AI Skills 4 All which was educational and interesting.

As a regular user of both Copilot and Edge I decided to give it a go, it was free and took less than 8 hours, so I thought why not?

Basically they brought up the basics of how generative AI work, how to write good prompts and how they leverage the Edge browser. 

The way we should see Copilot is not as the primary agent of choice, but rather our second pilot, that can offload us from certain tasks. We are still responsible for what we do with the tool in that sense. At this stage these generative AI:s, especially Copilot, is better at texts and images than math.

Its strengths are brainstorming, handling large amount of information and creating general ideas for the low risk scenarios. The general downsides of Copilot is that it does not think or feel, it is not always accurate and you can't rely on it as a friend. It also comes with biases of its own.

Improve your prompts

Writing good prompts for AI consists of four main parts.

1. A goal, such as creating a bunch of bullet points detailing the last quarter

2. Context, such as defining a setting where the material will be used, for example a breakfast presentation. You could also specify what type of people that will attend. For example whether it is marketers, competitors or managers.

3. Source of the information, make sure to ask Copilot where to get the data from. This is important because not only is it your job to ensure the quality of the result, but you might know that some sources are better in certain fields. You will notice that the sources are linked in the result as well, if you want to continue your research.

4. Expectations, define what you want out of the material, what sort of result should it create?

Customizing your prompts further

There are additional things that you need to think about in order to create better prompts, such as being rich with details. Remember to add the most important things first, it is valued higher, this is especially true when creating images.

Here is an example of the prompt "Create an image of the planet Mars"


This is the result of the prompt "Now create an image of the planet Mars, from the surface of the planet, where you can an early human settlement, do not include any people. The sky should be daytime."



You can also ask the AI to ask you controlling questions back to you before presenting the result. This increased content quality. You could ask Copilot to return five questions about the material as an example.

To shape the content further, ask the chatbot to take on certain personas. You could for instance ask it to act as an PR-expert to create a certain effect with the text.

Keep in mind that if you are logged in, you can save a history of previous chats. You can also attempt to regenerate the reply, by simply asking it to do so, you might then get a variation of the reply.

What to avoid

There are a few things to avoid when you work with the Copilot, these pointers will also help you make better decisions when taking the help from AI. 

1. Avoid math that you cannot check yourself afterwards, this is due to the probabilistic nature of the generative AI. It uses mathematical models to predict what the next "token" in a sentence is, such as a word or another small piece of data. You can in worst case get different results from the same question. Instead try to focus on outputting text and code for example.

2. Don't be too sparse with the details, it will negatively impact your results.

3. Don't upload information, data, images and so on that might be sensitive or personal.

Troubleshooting the output

If an error occurs you can try to figure out what could have been causing the mishap.

For this it is also important to know how Copilot works. First it searches, then a Large Language Model is used to summarize the content and then it is filtered and presented. 

You can ask yourself these questions when troubleshooting the result:

  • Is there an issue with how the question was asked?
  • Are there problems with the sources used? Can other sources be used instead?
  • Was there something wrong at the search stage?
  • Was there an issue with the summarizing stage?
  • Did something happen when it was presented?

Different ways to use Copilot

One thing that I myself learned from the course was an efficient way to use Copilot in the sidebar together with Microsoft Office in the browser. This is handy as Copilot is not necessarily integrated into the Office programs that you install on your PC, at the time of this blogpost.

Use the sidebar AI in Microsoft Edge to analyse, summarize, correct or improve Word documents that you have open in the browser, when you are working in Office online. You can of course use it on other sites too and let it assist you in evaluating and working with different content. Another hack I like to use is to take a snippet and upload it, and ask questions about the content.

There is also a speech function and if you use it, you will notice that it speaks back to you.

For mobile they have a dedicated app for Copilot as well, it pretty much fills the same role there, a plus for using the app is that you can use the camera to identify objects for example or transcribe text that you take a photo of.

Summary

Let's wrap this post up by saying that Copilot has helped me a lot, both professionally and in private. Personally I use it as an advanced search engine sometimes, with whom I can discuss the results and ask clarifying questions. I also use it to generate PowerShell code these days, but I try to understand the concept before I ask it to produce the code, this is so that I can evaluate the result better. It is a philosophy of mine that it is better to have done something the hard way (or at least have tried) first, because it gives a better intuitions of the subject.

The course raised my awareness of the probabilistic side of the AI, which explains the interesting results that one sometimes gets. Remember to use the up and down thumb to continue to train the AI, so that it becomes better.

Enjoy!

Sunday, February 19, 2023

Tech: A few thoughts on the current state of AI

The essential caveat

At this point in time, and at least in my filter bubble, there has been a lot of discussion about ChatGPT, GPT-3.5, the advancements in AI and of course the implications on humanity.

It takes a while for a person to build their own opinion and I can't say that I have fully made up my mind either. It feels like it would not be wise to take a definite stand as I simply can't know everything there is to know about AI.

The meta perspective

AI technology is not something new and nor are chatbots. Back in the days of MSN messenger for example, there were rudimentary chatbots such as SmarterChild

However, ChatGPT and the like offers a richer experience, the simplest of chatbots can be a "if then clause" while ChatGPT can create solid content. 

Even if technology is new, useful and cool, such as AR glasses or VR headsets they don't necessarily get adopted by everyone. There is for example a price threshold keeping people out of the VR market. Sometimes the product is impressive but simply not useful.

The mainstream use of horses was replaced with cars and trains one might say and we never went back to the older generation of technology so to speak. In the same manner I believe that these advanced chatbots will replace certain segments of the world and reinforce others.

So from a meta perspective, we might see a wider adoption rate as long as the products are free, useful and easy to use. To at least some this will be a tool to have in the toolbox and a skill to become better at.

In order to not fall behind in the rapid development of tech we need to at least use the tech as regular people, not necessarily do the programming ourselves. Ask yourself in what area of your life you can use this as a tool.

AI generated text and images

There has been AI generated images circulating the internet before and now it has reached the mainstream (again). People are rushing to explore the technology and some even try to cut out a business using this technology.

It is impressive how good some results are but it also stands clear that we still can spot the difference between what is computer generated and not. 

In regards to the role in academics we might see a conflict between the old ways and the new ways, yet new technology won't just disappear because the old ways wills it. Some might struggle a bit and focus more on detecting the use of AI while others will embrace it and make it a part of learning.

There is great the debate about how the future will look like, will AI take over? We do not know, but we see more and more how we integrate the technology into our lives and society. Not learning the basics of complementary AI is to isolate yourself from what is to come and truly make yourself vulnerable.

Those that take part and try things out will be more comfortable with the technology and will have an easier time telling the difference between the bad and the good tech.

The future

Let's say your are using this technology, perhaps just asking the chatbot to solve programming challenges or enhance your browsing experience. You are outsourcing a part of your mental activity, just like we've outsourced calculations, navigation, memories and other things that once were a natural part of our day to day lives. Don't forget that we've outsourced cleaning and washing with the helps of machines before the advanced chatbot era. Will we end up with more sparetime? What will be the next thing that we outsource? What will become of us?

We can also ponder the technological development - what happens when computers become even more efficient - such as the quantum computer, or if we attach the AI to robotic bodies that can do more than just write words and create images? What role will these things have in our ambition to move into space on a greater scale?