Skip to content

Commit 71365e2

Browse files
committed
writing more words
1 parent c59b8f0 commit 71365e2

File tree

3 files changed

+49
-38
lines changed

3 files changed

+49
-38
lines changed

02_Overview_Azure_OpenAI/README.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ Azure OpenAI is a collaboration between Microsoft Azure and OpenAI, a leading re
44

55
Azure OpenAI is designed to accelerate the development of AI applications, allowing users to focus on creating innovative solutions that deliver value to their organizations and customers.
66

7-
https://microsoft.github.io/PartnerResources/azure/data-analytics-ai/openai
8-
97
Here are ways that Azure OpenAI can help developers:
108

119
- **Simplified integration** - Simple and easy-to-use APIs for tasks such as text generation, summarization, sentiment analysis, language translation, and more.
@@ -16,18 +14,12 @@ Here are ways that Azure OpenAI can help developers:
1614
- **Responsible AI** - Azure OpenAI promotes responsible AI by adhering to ethical principles, providing explainability tools, governance features, diversity and inclusion support, and collaboration opportunities. These measures help ensure that AI models are unbiased, explainable, trustworthy, and used in a responsible and compliance manner.
1715
- **Community support** - With an active developer community developers can seek help via forums and other community support channels.
1816

19-
https://azure.microsoft.com/en-us/blog/explore-the-benefits-of-azure-openai-service-with-microsoft-learn/
20-
21-
2217
## Comparison of Azure OpenAI and OpenAI
2318

2419
Azure OpenAI Service gives customers advanced language AI with OpenAI GPT-4, GPT-3, Codex, DALL-E, and Whisper models with the security and enterprise promise of Azure. Azure OpenAI co-develops the APIs with OpenAI, ensuring compatibility and a smooth transition from one to the other.
2520

2621
With Azure OpenAI, customers get the security capabilities of Microsoft Azure while running the same models as OpenAI. Azure OpenAI offers private networking, regional availability, and responsible AI content filtering.
2722

28-
https://learn.microsoft.com/en-us/azure/ai-services/openai/overview#comparing-azure-openai-and-openai
29-
30-
3123
## Data Privacy and Security
3224

3325
Azure OpenAI stores and processes data to provide the service and to monitor for uses that violate the applicable product terms. Azure OpenAI is fully controlled by Microsoft. Microsoft hosts the OpenAI models in Microsoft Azure for your usage of Azure OpenAI, and does not interact with any services operated by OpenAI.
@@ -40,5 +32,3 @@ Here are a few important things to know in regards to the security and privacy o
4032
- are NOT used to improve any Microsoft or 3rd party products or services.
4133
- are NOT used for automatically improving Azure OpenAI models for your use in your resource (The models are stateless, unless you explicitly fine-tune models with your training data).
4234
- Your fine-tuned Azure OpenAI models are available exclusively for your use.
43-
44-
https://learn.microsoft.com/en-us/legal/cognitive-services/openai/data-privacy#how-does-the-azure-openai-service-process-data

03_Overview_AI_Concepts/README.md

Lines changed: 49 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Overview of AI Concepts
22

3-
43
## Large Language Models (LLM)
54

65
A Large Language Models (LLM) is a type of AI that can process and produce natural language text. LLMs are "general purpose" AI models trained using massive amounts of data gathered from various sources; like books, articles, webpages, and images to discover patterns and rules of language.
@@ -12,7 +11,7 @@ Understanding the capabilities of what an LLM can do is important when deciding
1211
- **Understand language** - An LLM is a predictive engine that pulls patterns together based on pre-existing text to produce more text. It doesn't understand language or math.
1312
- **Understand facts** - An LLM doesn't have separate modes for information retrieval and creative writing; it simply predicts the next most probable token.
1413
- **Understand manners, emotion, or ethics** - An LLM can't exhibit anthropomorphism or understand ethics. The output of a foundational model is a combination of training data and prompts.
15-
14+
1615
### Foundational Models
1716

1817
Foundational Models are specific instances or versions of an LLM. Examples of these would be GPT-3, GPT-4, or Codex. Foundational models are trained and fine-tuned on a large corpus of text, or code in the case of a Codex model instance.
@@ -37,6 +36,11 @@ Here are a few things that separate NLPs from LLMs:
3736

3837
A prompt is an input or instruction provided to an Artificial Intelligence (AI) model to direct its behavior and produce the desired results. The quality and specificity of the prompt are crucial in obtaining precise and relevant outputs. A well-designed prompt can ensure that the AI model generates the desired information or completes the intended task effectively. Some typical prompts include summarization, question answering, text classification, and code generation.
3938

39+
While there's techniques and patterns used when building an Azure OpenAI solution and writing prompts, the following is a couple simple prompt examples:
40+
41+
- `List the most popular products in the last quarter.`
42+
- `How many customers are located in the state of California?`
43+
4044
#### Guidelines for creating robust prompts
4145

4246
While it can be quick to write basic prompts, it can also be difficult to write more complex prompts to ge the AI to generate the responses necessary. When writing prompts, there are three basic guidelines to follow for creating useful prompts:
@@ -54,19 +58,18 @@ While it can be quick to write basic prompts, it can also be difficult to write
5458
context, input, output indicator
5559
There are a several components that are used in the anatomy of constructing AI prompts:
5660

57-
- Instructions
58-
- Primary content
59-
- System message
60-
61-
https://learn.microsoft.com/en-us/semantic-kernel/prompts/
62-
63-
https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/prompt-engineering
61+
- Input
62+
- Instructions
63+
- Primary content
64+
- Supporting content
65+
- System message
66+
- Output
6467

65-
https://learn.microsoft.com/en-us/semantic-kernel/prompt-engineering/
68+
#### Input
6669

67-
https://learn.microsoft.com/en-us/training/modules/introduction-large-language-models/3-large-language-model-core-concepts
70+
The Input in prompt engineering is the text or query that is provided to the LLM model. The model will use this prompt as the basis for the completion, or response, that is generated.
6871

69-
#### Instructions
72+
##### Instructions
7073

7174
Instructions are likely the most commonly used prompt component. Instructions are simply that: instructions to the model on what to do. While simple in concept, they can be complex in practice.
7275

@@ -78,7 +81,7 @@ The following are examples of both simple and more complex instructions:
7881
| Complex | Write an introduction for a weekly newsletter to my company named Contoso. It should mention the great all hands meeting we had last week and thank the team for all their hard work over the tough past few months. | Welcome to Contoso's weekly newsletter! We had a great all hands meeting last week and I want to thank the team for all their hard work over the tough past few months. We're looking forward to a bright future and I'm confident that with our team's dedication and commitment, we will achieve great things. Thank you for being a part of our team and I look forward to working with you all in the coming weeks and months. Sincerely, [Your name]. |
7982
| Complex | Write an introduction for a weekly newsletter, including the following: <br/> - My company is named contoso <br/> - An exuberant greeting <br/> - Thanking the team for their hard work over a couple tough months <br/> - Positive outlook for the coming quarter <br/> - Signed by the SLT | Hello Contoso team! I wanted to take a moment to thank you for all your hard work over the past few months. It's been a tough couple of months, but you've all pulled together and done an amazing job. I'm really proud of you all. Looking ahead to the next quarter, I'm feeling really positive. I think we're going to achieve some great things. Thanks again, The Senior Leadership Team. |
8083

81-
#### Primary Content
84+
##### Primary Content
8285

8386
Primary content refers to some sort of text that is being processed or transformed by the model. Primary content is typically used in conjunction with instructions. A simple example would be language translation.
8487

@@ -88,12 +91,43 @@ Primary content refers to some sort of text that is being processed or transform
8891

8992
Primary content can also be much longer. For example, the primary content could pass the introduction section of text content that could be hundreds of words long. Additionally, the primary content could be int he form of structured data as well, such as in JSON or TSV format.
9093

91-
#### System message
94+
##### Supporting Content
95+
96+
Supporting content is information that the model can utilize to influence the output in some way. It differs from primary content in that it is not the main target of task, but it is typically used along with primary content. Common examples include contextual information such as the current date, the name of the user, user preferences, and so on.
97+
98+
The following are example prompts and possible completions to show what a prompt with and without supporting content might look like:
99+
100+
| Supporting Content | Prompt | Completion |
101+
| :--- | :--- | :--- |
102+
| Without | Workshop list:
103+
Title Description <br/> Planning Workshop Kickoff Please join us to kick off our workshop! Hear from our leaders about cross group priorities and learnings for the year ahead. The invitation to this event has already been sent to everyone in [] <br/> Summarize the workshops above, grouped by topic: | Workshop list: <br/> Planning Workshop Kickoff <br/> - Planning Workshop Wrap-up <br/> - Core MeetUp <br/> - Customer <br/> Driven Perspectives <br/> - Impact and Key Focus Areas <br/> - Best practices <br/> - Accelerating app adoption [] |
104+
| With | Workshop list: <br/> Title Description <br/> Planning Workshop Kickoff Please join us to kick off our workshop! Hear from our leaders about cross group priorities and learnings for the year ahead. The invitation to this event has already been sent to everyone in [] <br/> My Important Topics: prompt engineering, search, GPT models <br/> Summarize the workshops above, grouped by my important topics: | 1. Prompt Engineering: <br/> - New prompt engineering tips <br/> - The art of prompt engineering <br/> 2. Search: <br/> - Intro to vector search with embedding <br/> 3. GPT Models: <br/> - Intro to GPT-4 <br/> - GPT-35-Turbo in-depth. |
105+
106+
The above prompt examples are truncated with `[…]` for brevity. Writing similar prompts would contain more text.
92107

93-
https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/system-message
108+
##### System message
94109

110+
System message, also called a system prompt, is used by developers of a system to restrict the LLM to a specific set of constraints. This is useful when building enterprise solutions that integrate Azure OpenAI so the AI completion will be restricted to the focus of the enterprise data it's integrated with.
95111

112+
The following is an example system message that could be used to constrain the LLM in an enterprise solution:
96113

114+
```text
115+
You are a helpful, fun and friendly sales assistant for Cosmic Works, a bicycle and bicycle accessories store.
116+
117+
Your name is Cosmo.
118+
119+
You are designed to answer questions about the products that Cosmic Works sells, the customers that buy them, and the sales orders that are placed by customers.
120+
121+
If you don't know the answer to a question, respond with "I don't know."
122+
123+
Only answer questions related to Cosmic Works products, customers, and sales orders.
124+
125+
If a question is not related to Cosmic Works products, customers, or sales orders, respond with "I only answer questions about Cosmic Works
126+
```
127+
128+
#### Output
129+
130+
The Output is the completion, or response, from the LLM returned as a result to the input prompt given. When an input prompt is given, the language model will process the information and generate an output in the form of text. The text response is the output.
97131

98132
## Standard Patterns
99133

@@ -142,10 +176,3 @@ Example:
142176
| Prompt | Completion |
143177
| :--- | :--- |
144178
| Headline: Twins' Correa to use opt-out, test free agency <br/> Topic: Baseball <br/> Headline: Qatar World Cup to have zones for sobering up <br/> Topic: Soccer <br/> Headline: Yates: Fantasy football intel for Week 6 <br/> Topic: Football <br/> Headline: Coach confident injury won't derail Warriors <br/> Topic: | Basketball |
145-
146-
https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/advanced-prompt-engineering?pivots=programming-language-chat-completions#provide-grounding-context
147-
148-
149-
## Vectorization and Vector Search
150-
151-
What are you trying to solve with finding relevant data through vector?

04_Explore_OpenAI_models/README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ GPT-4 can solve difficult problems with greater accuracy than any of OpenAI's pr
1818

1919
The GPT-35-Turbo and GPT-4 models are language models that are optimized for conversational interfaces. The models behave differently than the older GPT-3 models. Previous models were text-in and text-out, meaning they accepted a prompt string and returned a completion to append to the prompt. However, the GPT-35-Turbo and GPT-4 models are conversation-in and message-out. The models expect input formatted in a specific chat-like transcript format, and return a completion that represents a model-written message in the chat. While this format was designed specifically for multi-turn conversations, you'll find it can also work well for non-chat scenarios too.
2020

21-
https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/chatgpt?tabs=python&pivots=programming-language-chat-completions
22-
23-
https://learn.microsoft.com/en-us/semantic-kernel/prompt-engineering/llm-models
24-
25-
https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models
26-
2721
### DALL-E
2822

2923
The DALL-E model, enables the use of a text prompt provided by a user as the input that the model then uses to generate an image response.

0 commit comments

Comments
 (0)