diff --git a/guidance/llms/_openai.py b/guidance/llms/_openai.py index 6be8281fd..e946479ba 100644 --- a/guidance/llms/_openai.py +++ b/guidance/llms/_openai.py @@ -108,7 +108,7 @@ def __init__(self, model=None, caching=True, max_retries=5, max_calls_per_min=60 self._tokenizer = tiktoken.get_encoding("cl100k_base") self.chat_mode = chat_mode - self.model = model + self.model_name = model self.caching = caching self.max_retries = max_retries self.max_calls_per_min = max_calls_per_min @@ -169,7 +169,7 @@ def __call__(self, prompt, stop=None, stop_regex=None, temperature=None, n=1, ma try: self.add_call() call_args = { - "model": self.model, + "model": self.model_name, "prompt": prompt, "max_tokens": max_tokens, "temperature": temperature, diff --git a/notebooks/anachronism.ipynb b/notebooks/anachronism.ipynb index 23f1f6dd9..96839a4b4 100644 --- a/notebooks/anachronism.ipynb +++ b/notebooks/anachronism.ipynb @@ -165,6 +165,14 @@ "print('Few-shot', (np.array(labels) == fews).mean())\n", "print('Structured output', (np.array(labels) == structs).mean())" ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "
\n", + "
Have an idea for more helpful examples? Pull requests that add to this documentation notebook are encouraged!
" + ] } ], "metadata": { diff --git a/notebooks/chat.ipynb b/notebooks/chat.ipynb index 0dc749840..c582d8721 100644 --- a/notebooks/chat.ipynb +++ b/notebooks/chat.ipynb @@ -1,21 +1,24 @@ { "cells": [ { - "cell_type": "code", - "execution_count": 1, + "attachments": {}, + "cell_type": "markdown", "metadata": {}, - "outputs": [], "source": [ - "import guidance\n", - "import re" + "# Chat dialog\n", + "\n", + "Guidance supports chat-based models like ChatGPT and GPT-4 using role tags. These are then converted to the appropriate format for the model (either a JSON API format or special tokens)." ] }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ + "import guidance\n", + "import re\n", + "\n", "guidance.llm = guidance.llms.OpenAI(\"gpt-4\")" ] }, @@ -28,13 +31,13 @@ }, { "cell_type": "code", - "execution_count": 40, + "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "
Stop program
system
You are a helpful assistant.
\n", "{{!--GHIDDEN:\n", "{{!--GMARKER_START_user${{#user~}}\n", @@ -56,8 +59,8 @@ "{{~/user}}$--_END_END
user
I want to {{!--GMARKER_START_variable_ref${{goal}}$--_END_ENDread more books{{!--GMARKER_END_variable_ref$$--_END_END.Can you please generate one option for how to accomplish this?\n", "Please make the option very short, at most one line.
{{!--GMARKER_END_user$$--_END_END\n", "{{!--GMARKER_START_assistant$&#123;&#123;#assistant~&#125;&#125;\n", - "&#123;&#123;gen 'options' n=5 temperature=1.0 stop='<|im_end|>' max_tokens=500&#125;&#125;\n", - "&#123;&#123;~/assistant&#125;&#125;$--_END_END
assistant
{{!--GMARKER_START_gen$&#123;&#123;gen 'options' n=5 temperature=1.0 stop='
' max_tokens=500&#125;&#125;$--_END_END{{!--GMARKERmany_generate_start_True_5$97634d07087c4558a24f531027f91b0b$--_END_ENDSet a daily reading goal, such as one chapter or 30 minutes every day.{{!--GMARKERmany_generate_True_1$97634d07087c4558a24f531027f91b0b$--_END_ENDJoin a book club to stay motivated and accountable for regular reading.{{!--GMARKERmany_generate_True_2$97634d07087c4558a24f531027f91b0b$--_END_ENDJoin a book club to stay accountable and motivated to read consistently.{{!--GMARKERmany_generate_True_3$97634d07087c4558a24f531027f91b0b$--_END_ENDJoin a book club to stay motivated and engage in discussions with like-minded readers.{{!--GMARKERmany_generate_True_4$97634d07087c4558a24f531027f91b0b$--_END_ENDJoin a book club to stay accountable and motivated to read regularly.{{!--GMARKERmany_generate_end$97634d07087c4558a24f531027f91b0b$--_END_END{{!--GMARKER_END_gen$$--_END_END<|im_end|>{{!--GMARKER_END_assistant$$--_END_END\n", + "&#123;&#123;gen 'options' n=5 temperature=1.0 max_tokens=500&#125;&#125;\n", + "&#123;&#123;~/assistant&#125;&#125;$--_END_END
assistant
{{!--GMARKER_START_gen$&#123;&#123;gen 'options' n=5 temperature=1.0 max_tokens=500&#125;&#125;$--_END_END{{!--GMARKERmany_generate_start_True_5$14f6c9f32f664f9c89918ffa10733daf$--_END_ENDSet a daily goal to read at least 30 minutes before bed.{{!--GMARKERmany_generate_True_1$14f6c9f32f664f9c89918ffa10733daf$--_END_ENDJoin a book club to stay accountable and encouraged by fellow readers.{{!--GMARKERmany_generate_True_2$14f6c9f32f664f9c89918ffa10733daf$--_END_ENDJoin a book club to motivate and schedule regular reading.{{!--GMARKERmany_generate_True_3$14f6c9f32f664f9c89918ffa10733daf$--_END_ENDJoin a book club to stay accountable and motivated to read regularly.{{!--GMARKERmany_generate_True_4$14f6c9f32f664f9c89918ffa10733daf$--_END_ENDJoin a book club to encourage regular reading with others.{{!--GMARKERmany_generate_end$14f6c9f32f664f9c89918ffa10733daf$--_END_END{{!--GMARKER_END_gen$$--_END_END
{{!--GMARKER_END_assistant$$--_END_END\n", "--}}
{{!--GHIDDEN:\n", "{{!--GMARKER_START_user$&#123;&#123;#user~&#125;&#125;\n", @@ -85,36 +88,36 @@ "Can you please comment on the pros and cons of each of the following options, and then pick the best option?\n", "---{{!--GMARKER_START_each$&#123;&#123;#each options&#125;&#125;\n", "Option &#123;&#123;@index&#125;&#125;: &#123;&#123;this&#125;&#125;&#123;&#123;/each&#125;&#125;$--_END_END\n", - "Option {{!--GMARKER_START_variable_ref$&#123;&#123;@index&#125;&#125;$--_END_END0{{!--GMARKER_END_variable_ref$$--_END_END: {{!--GMARKER_START_variable_ref$&#123;&#123;this&#125;&#125;$--_END_ENDSet a daily reading goal, such as one chapter or 30 minutes every day.{{!--GMARKER_END_variable_ref$$--_END_END\n", - "Option {{!--GMARKER_START_variable_ref$&#123;&#123;@index&#125;&#125;$--_END_END1{{!--GMARKER_END_variable_ref$$--_END_END: {{!--GMARKER_START_variable_ref$&#123;&#123;this&#125;&#125;$--_END_ENDJoin a book club to stay motivated and accountable for regular reading.{{!--GMARKER_END_variable_ref$$--_END_END\n", - "Option {{!--GMARKER_START_variable_ref$&#123;&#123;@index&#125;&#125;$--_END_END2{{!--GMARKER_END_variable_ref$$--_END_END: {{!--GMARKER_START_variable_ref$&#123;&#123;this&#125;&#125;$--_END_ENDJoin a book club to stay accountable and motivated to read consistently.{{!--GMARKER_END_variable_ref$$--_END_END\n", - "Option {{!--GMARKER_START_variable_ref$&#123;&#123;@index&#125;&#125;$--_END_END3{{!--GMARKER_END_variable_ref$$--_END_END: {{!--GMARKER_START_variable_ref$&#123;&#123;this&#125;&#125;$--_END_ENDJoin a book club to stay motivated and engage in discussions with like-minded readers.{{!--GMARKER_END_variable_ref$$--_END_END\n", - "Option {{!--GMARKER_START_variable_ref$&#123;&#123;@index&#125;&#125;$--_END_END4{{!--GMARKER_END_variable_ref$$--_END_END: {{!--GMARKER_START_variable_ref$&#123;&#123;this&#125;&#125;$--_END_ENDJoin a book club to stay accountable and motivated to read regularly.{{!--GMARKER_END_variable_ref$$--_END_END{{!--GMARKER_each$$--_END_END{{!--GMARKER_each$$--_END_END{{!--GMARKER_each$$--_END_END{{!--GMARKER_each$$--_END_END{{!--GMARKER_each$$--_END_END{{!--GMARKER_each$$--_END_END{{!--GMARKER_END_each$$--_END_END\n", + "Option {{!--GMARKER_START_variable_ref$&#123;&#123;@index&#125;&#125;$--_END_END0{{!--GMARKER_END_variable_ref$$--_END_END: {{!--GMARKER_START_variable_ref$&#123;&#123;this&#125;&#125;$--_END_ENDSet a daily goal to read at least 30 minutes before bed.{{!--GMARKER_END_variable_ref$$--_END_END\n", + "Option {{!--GMARKER_START_variable_ref$&#123;&#123;@index&#125;&#125;$--_END_END1{{!--GMARKER_END_variable_ref$$--_END_END: {{!--GMARKER_START_variable_ref$&#123;&#123;this&#125;&#125;$--_END_ENDJoin a book club to stay accountable and encouraged by fellow readers.{{!--GMARKER_END_variable_ref$$--_END_END\n", + "Option {{!--GMARKER_START_variable_ref$&#123;&#123;@index&#125;&#125;$--_END_END2{{!--GMARKER_END_variable_ref$$--_END_END: {{!--GMARKER_START_variable_ref$&#123;&#123;this&#125;&#125;$--_END_ENDJoin a book club to motivate and schedule regular reading.{{!--GMARKER_END_variable_ref$$--_END_END\n", + "Option {{!--GMARKER_START_variable_ref$&#123;&#123;@index&#125;&#125;$--_END_END3{{!--GMARKER_END_variable_ref$$--_END_END: {{!--GMARKER_START_variable_ref$&#123;&#123;this&#125;&#125;$--_END_ENDJoin a book club to stay accountable and motivated to read regularly.{{!--GMARKER_END_variable_ref$$--_END_END\n", + "Option {{!--GMARKER_START_variable_ref$&#123;&#123;@index&#125;&#125;$--_END_END4{{!--GMARKER_END_variable_ref$$--_END_END: {{!--GMARKER_START_variable_ref$&#123;&#123;this&#125;&#125;$--_END_ENDJoin a book club to encourage regular reading with others.{{!--GMARKER_END_variable_ref$$--_END_END{{!--GMARKER_each$$--_END_END{{!--GMARKER_each$$--_END_END{{!--GMARKER_each$$--_END_END{{!--GMARKER_each$$--_END_END{{!--GMARKER_each$$--_END_END{{!--GMARKER_each$$--_END_END{{!--GMARKER_END_each$$--_END_END\n", "---\n", "Please discuss each option very briefly (one line for pros, one for cons), and end by saying Best=X, where X is the best option.
{{!--GMARKER_END_user$$--_END_END\n", "{{!--GMARKER_START_assistant$&#123;&#123;#assistant~&#125;&#125;\n", - "&#123;&#123;gen 'prosandcons' stop='<|im_end|>' temperature=0.0 max_tokens=500&#125;&#125;\n", - "&#123;&#123;~/assistant&#125;&#125;$--_END_END
assistant
{{!--GMARKER_START_gen$&#123;&#123;gen 'prosandcons' stop='
' temperature=0.0 max_tokens=500&#125;&#125;$--_END_ENDOption 0: \n", - "Pros: Establishes a consistent reading habit and is easy to track.\n", - "Cons: May feel repetitive and lacks social interaction.\n", + "&#123;&#123;gen 'prosandcons' temperature=0.0 max_tokens=500&#125;&#125;\n", + "&#123;&#123;~/assistant&#125;&#125;$--_END_END
assistant
{{!--GMARKER_START_gen$&#123;&#123;gen 'prosandcons' temperature=0.0 max_tokens=500&#125;&#125;$--_END_ENDOption 0: \n", + "Pros: Establishes a consistent reading routine and helps wind down before bed.\n", + "Cons: May be difficult to maintain if not a night person or if too tired.\n", "---\n", "Option 1: \n", - "Pros: Provides motivation, accountability, and social interaction.\n", - "Cons: May have less control over book choices and reading pace.\n", + "Pros: Provides accountability and encouragement from fellow readers.\n", + "Cons: May not guarantee consistent reading if meetings are infrequent.\n", "---\n", "Option 2: \n", - "Pros: Encourages consistent reading and offers a support system.\n", - "Cons: Limited book choices and potential scheduling conflicts.\n", + "Pros: Offers motivation and a structured reading schedule.\n", + "Cons: May feel pressured to read at the group's pace.\n", "---\n", "Option 3: \n", - "Pros: Enhances reading experience through discussions and motivation.\n", - "Cons: May require more time commitment and less personal book choice.\n", + "Pros: Ensures regular reading and motivation through group accountability.\n", + "Cons: May be challenging to find a book club with similar interests.\n", "---\n", "Option 4: \n", - "Pros: Promotes regular reading and offers a sense of accountability.\n", - "Cons: Less control over book selection and possible time constraints.\n", - "---\n", - "Best=1 (Option 1 provides a good balance of motivation, accountability, and social interaction while still allowing for some personal choice in reading.){{!--GMARKER_END_gen$$--_END_END<|im_end|>{{!--GMARKER_END_assistant$$--_END_END\n", + "Pros: Encourages reading with others, fostering a sense of community.\n", + "Cons: May not provide enough individual accountability for reading goals.\n", + "\n", + "Best=3{{!--GMARKER_END_gen$$--_END_END
{{!--GMARKER_END_assistant$$--_END_END\n", "--}}
user
I want to read more books.\n", "Here is my plan:\n", - "Join a book club to stay motivated and accountable for regular reading.\n", + "Join a book club to stay accountable and motivated to read regularly.\n", "Please elaborate on this plan, and tell me how to best accomplish it.
assistant
Your plan to join a book club to stay motivated and accountable for regular reading is a great idea. Here's an elaboration on your plan and some steps to help you accomplish it:\n", - "\n", - "1. Research book clubs: Start by looking for book clubs in your local area or online. Local libraries, community centers, and bookstores often host book clubs. You can also search for book clubs on social media platforms like Facebook or Meetup.\n", + "&#123;&#123;gen 'plan' max_tokens=500&#125;&#125;\n", + "&#123;&#123;~/assistant&#125;&#125;'>
assistant
That's a great plan! Joining a book club can indeed help you stay accountable and motivated to read regularly. Here's an elaboration on your plan and some steps to help you accomplish it:\n", "\n", - "2. Choose the right book club: Consider your interests and preferences when selecting a book club. Some clubs focus on specific genres, while others read a variety of books. Make sure the club's reading selections and meeting frequency align with your reading goals and schedule.\n", + "1. Research book clubs: Start by looking for book clubs in your local area or online. You can search for book clubs on social media platforms, local libraries, community centers, or websites like Meetup.com and Goodreads. Consider your interests and preferences when choosing a book club, such as the genre of books they read, the frequency of meetings, and the size of the group.\n", "\n", - "3. Attend meetings regularly: Once you've joined a book club, make a commitment to attend meetings consistently. This will help you stay accountable and motivated to read the assigned books. If the book club meets in person, try to arrive on time and participate in discussions. If it's an online club, engage in forum discussions or video calls.\n", + "2. Choose the right book club: Once you have found a few book clubs that interest you, attend a meeting or two to see if the group is a good fit for you. Make sure the members are friendly and welcoming, and that the discussions are engaging and thought-provoking. You should also consider the club's reading pace and ensure it aligns with your reading goals.\n", "\n", - "4. Set personal reading goals: In addition to the book club's reading schedule, set your own personal reading goals. This could include reading a certain number of books per month or exploring new genres. Track your progress and celebrate your achievements.\n", + "3. Commit to the book club: Once you have found a book club that suits your needs, make a commitment to attend meetings regularly and participate actively in the discussions. This will help you stay accountable and motivated to read the selected books.\n", "\n", - "5. Create a reading routine: Establish a daily or weekly reading routine to help you stay on track with your book club's reading assignments and your personal reading goals. Set aside a specific time each day or week for reading, and find a comfortable, quiet space where you can focus.\n", + "4. Set personal reading goals: In addition to the book club's reading schedule, set personal reading goals for yourself. This can include reading a certain number of books per month or setting aside a specific time each day for reading.\n", "\n", - "6. Engage with fellow book club members: Connect with other members of your book club to discuss the books you're reading, share recommendations, and exchange reading tips. Building relationships with fellow book lovers can help keep you motivated and make the experience more enjoyable.\n", + "5. Create a reading routine: Establish a daily reading routine that works for you. This can be as simple as reading for 20 minutes before bed or setting aside an hour each morning to read. Find a quiet and comfortable space where you can focus on your book without distractions.\n", "\n", - "7. Stay open-minded: Be open to reading books that you might not have chosen on your own. This can help you discover new authors, genres, and perspectives, and it can also lead to interesting discussions with your book club members.\n", + "6. Track your progress: Keep track of the books you've read and your thoughts on them. You can do this in a reading journal, a spreadsheet, or an app like Goodreads. This will help you monitor your progress and motivate you to continue reading.\n", "\n", - "8. Reflect on your reading: After finishing a book, take some time to reflect on what you've read. Consider how the book affected you, what you learned from it, and how it might relate to your own life or experiences. This can help deepen your understanding and appreciation of the books you read.\n", + "7. Share your thoughts and recommendations: Engage with your book club members and other readers by sharing your thoughts on the books you've read. This can be done during book club meetings, on social media, or through online forums. Sharing your thoughts and recommendations can help deepen your understanding of the books and inspire others to read more as well.\n", "\n", - "By following these steps, you'll be well on your way to accomplishing your goal of reading more books through joining a book<|im_end|>
\n", - "" + "8. Be open to new genres and authors: One of the benefits of joining a book club is the opportunity to explore new genres and authors. Be open to reading
\n", + "" ] }, "metadata": {}, @@ -168,7 +169,7 @@ "Please make the option very short, at most one line.\n", "{{~/user}}\n", "{{#assistant~}}\n", - "{{gen 'options' n=5 temperature=1.0 stop='<|im_end|>' max_tokens=500}}\n", + "{{gen 'options' n=5 temperature=1.0 max_tokens=500}}\n", "{{~/assistant}}\n", "{{/block}}\n", "{{~! generate pros and cons and select the best option ~}}\n", @@ -183,7 +184,7 @@ "Please discuss each option very briefly (one line for pros, one for cons), and end by saying Best=X, where X is the best option.\n", "{{~/user}}\n", "{{#assistant~}}\n", - "{{gen 'prosandcons' stop='<|im_end|>' temperature=0.0 max_tokens=500}}\n", + "{{gen 'prosandcons' temperature=0.0 max_tokens=500}}\n", "{{~/assistant}}\n", "{{/block}}\n", "{{#user~}}\n", @@ -194,7 +195,7 @@ "Please elaborate on this plan, and tell me how to best accomplish it.\n", "{{~/user}}\n", "{{#assistant~}}\n", - "{{gen 'plan' max_tokens=500 stop='<|im_end|>'}}\n", + "{{gen 'plan' max_tokens=500}}\n", "{{~/assistant}}''')\n", "\n", "out = create_plan(goal='read more books', parse_best=parse_best)\n", @@ -203,18 +204,18 @@ }, { "cell_type": "code", - "execution_count": 41, + "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Option 0: Set a daily reading goal, such as one chapter or 30 minutes every day.\n", - "Option 1: Join a book club to stay motivated and accountable for regular reading.\n", - "Option 2: Join a book club to stay accountable and motivated to read consistently.\n", - "Option 3: Join a book club to stay motivated and engage in discussions with like-minded readers.\n", - "Option 4: Join a book club to stay accountable and motivated to read regularly.\n" + "Option 0: Set a daily goal to read at least 30 minutes before bed.\n", + "Option 1: Join a book club to stay accountable and encouraged by fellow readers.\n", + "Option 2: Join a book club to motivate and schedule regular reading.\n", + "Option 3: Join a book club to stay accountable and motivated to read regularly.\n", + "Option 4: Join a book club to encourage regular reading with others.\n" ] } ], @@ -224,7 +225,7 @@ }, { "cell_type": "code", - "execution_count": 42, + "execution_count": 4, "metadata": {}, "outputs": [ { @@ -232,26 +233,26 @@ "output_type": "stream", "text": [ "Option 0: \n", - "Pros: Establishes a consistent reading habit and is easy to track.\n", - "Cons: May feel repetitive and lacks social interaction.\n", + "Pros: Establishes a consistent reading routine and helps wind down before bed.\n", + "Cons: May be difficult to maintain if not a night person or if too tired.\n", "---\n", "Option 1: \n", - "Pros: Provides motivation, accountability, and social interaction.\n", - "Cons: May have less control over book choices and reading pace.\n", + "Pros: Provides accountability and encouragement from fellow readers.\n", + "Cons: May not guarantee consistent reading if meetings are infrequent.\n", "---\n", "Option 2: \n", - "Pros: Encourages consistent reading and offers a support system.\n", - "Cons: Limited book choices and potential scheduling conflicts.\n", + "Pros: Offers motivation and a structured reading schedule.\n", + "Cons: May feel pressured to read at the group's pace.\n", "---\n", "Option 3: \n", - "Pros: Enhances reading experience through discussions and motivation.\n", - "Cons: May require more time commitment and less personal book choice.\n", + "Pros: Ensures regular reading and motivation through group accountability.\n", + "Cons: May be challenging to find a book club with similar interests.\n", "---\n", "Option 4: \n", - "Pros: Promotes regular reading and offers a sense of accountability.\n", - "Cons: Less control over book selection and possible time constraints.\n", - "---\n", - "Best=1 (Option 1 provides a good balance of motivation, accountability, and social interaction while still allowing for some personal choice in reading.)\n" + "Pros: Encourages reading with others, fostering a sense of community.\n", + "Cons: May not provide enough individual accountability for reading goals.\n", + "\n", + "Best=3\n" ] } ], @@ -268,13 +269,13 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "
Stop program
system
You are a helpful assistant.
What is the meaning of life?\n", "Who are 3 world-class experts (past or present) who would be great at answering this?\n", "Please don't answer the question or comment on it yet.
assistant
Three world-class experts who would be great at answering the question "What is the meaning of life?" are:\n", + "&#123;&#123;gen 'experts' temperature=0 max_tokens=300&#125;&#125;\n", + "&#123;&#123;~/assistant&#125;&#125;'>
assistant
Three world-class experts who would be great at answering the question "What is the meaning of life?" are:\n", "\n", - "1. Albert Camus (1913-1960) - A French philosopher, author, and journalist who explored the concept of the absurd and existentialism in his works.\n", - "2. Viktor Frankl (1905-1997) - An Austrian neurologist, psychiatrist, and Holocaust survivor who developed logotherapy, a form of existential analysis focused on finding meaning in life.\n", - "3. Dalai Lama (1935-present) - The 14th Dalai Lama, Tenzin Gyatso, is a spiritual leader in Tibetan Buddhism who often speaks about the importance of compassion, happiness, and inner peace in finding meaning in life.<|im_end|>
assistant
ANSWER: The meaning of life is a complex and multifaceted question that has been explored by philosophers, spiritual leaders, and psychologists throughout history. Some might argue that life's meaning is found in embracing the absurdity of existence and creating our own purpose through personal choices and actions. Others might contend that the search for meaning is an intrinsic part of human nature, and that we can find purpose by overcoming challenges, discovering our unique talents, and contributing to the well-being of others.\n", + "&#123;&#123;gen 'answer' temperature=0 max_tokens=500&#125;&#125;\n", + "&#123;&#123;~/assistant&#125;&#125;'>
assistant
ANSWER: The meaning of life is a complex and multifaceted question that has been contemplated by philosophers, spiritual leaders, and thinkers throughout history. There are several perspectives one might consider when attempting to answer this question.\n", + "\n", + "Some might argue that life is inherently absurd, and that the search for meaning is a futile endeavor. In this view, individuals must create their own meaning and purpose in life, embracing the absurdity of existence and finding personal fulfillment in their choices and actions.\n", + "\n", + "Others might argue that the meaning of life is found in the pursuit of meaning itself. This perspective emphasizes the importance of finding purpose and meaning in one's life, often through personal growth, relationships, and helping others. By striving to make sense of our experiences and seeking to understand our place in the world, we can find a sense of meaning and fulfillment.\n", "\n", - "In this vein, some propose that the meaning of life is deeply rooted in our relationships with others and our ability to cultivate compassion, happiness, and inner peace. By focusing on these aspects, we can create a sense of purpose and fulfillment in our lives. Ultimately, the meaning of life may be a deeply personal and subjective experience, shaped by our individual beliefs, values, and experiences.<|im_end|>
\n", - "" + "Another perspective suggests that the meaning of life is rooted in spiritual and philosophical beliefs. In this view, the purpose of life is to cultivate compassion, wisdom, and inner peace, ultimately striving for enlightenment and a deeper understanding of the nature of existence. This approach emphasizes the interconnectedness of all living beings and the importance of living a life guided by ethical principles and spiritual values.\n", + "\n", + "In conclusion, the meaning of life is a deeply personal and subjective question, with various perspectives offering different insights and potential paths to finding fulfillment and purpose. It is up to each individual to explore these perspectives and determine which resonates most with their own experiences and beliefs.
\n", + "" ] }, "metadata": {}, @@ -322,7 +329,7 @@ "Please don't answer the question or comment on it yet.\n", "{{~/user}}\n", "{{#assistant~}}\n", - "{{gen 'experts' stop=\"<|im_end|>\" temperature=0 max_tokens=300}}\n", + "{{gen 'experts' temperature=0 max_tokens=300}}\n", "{{~/assistant}}\n", "{{#user~}}\n", "Great, now please answer the question as if these experts had collaborated in writing a joint anonymous answer.\n", @@ -331,20 +338,20 @@ "Please start your answer with ANSWER:\n", "{{~/user}}\n", "{{#assistant~}}\n", - "{{gen 'answer' stop=\"<|im_end|>\" temperature=0 max_tokens=500}}\n", + "{{gen 'answer' temperature=0 max_tokens=500}}\n", "{{~/assistant}}''')\n", "experts(query='What is the meaning of life?')" ] }, { "cell_type": "code", - "execution_count": 37, + "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "
Stop program
system
You are a helpful assistant.
How can I be more productive?\n", "Who are 3 world-class experts (past or present) who would be great at answering this?\n", "Please don't answer the question or comment on it yet.
assistant
Three world-class experts who would be great at answering the question "How can I be more productive?" are:\n", + "&#123;&#123;gen 'experts' temperature=0 max_tokens=300&#125;&#125;\n", + "&#123;&#123;~/assistant&#125;&#125;'>
assistant
Three world-class experts who would be great at answering the question "How can I be more productive?" are:\n", "\n", "1. David Allen - Author of the book "Getting Things Done" and a renowned productivity consultant.\n", "2. Tim Ferriss - Author of "The 4-Hour Workweek" and a well-known entrepreneur, investor, and productivity expert.\n", - "3. Stephen Covey - Author of "The 7 Habits of Highly Effective People" and a respected leadership and productivity expert.<|im_end|>
assistant
ANSWER: To be more productive, consider implementing the following strategies and techniques, which have been recommended by various productivity experts:\n", + "&#123;&#123;gen 'answer' temperature=0 max_tokens=500&#125;&#125;\n", + "&#123;&#123;~/assistant&#125;&#125;'>
assistant
ANSWER: To be more productive, consider implementing the following strategies and techniques, which have been recommended by various productivity experts:\n", "\n", "1. Prioritize tasks: Identify the most important tasks and focus on completing them first. Some experts suggest using the Eisenhower Matrix to categorize tasks into four quadrants based on their urgency and importance.\n", "\n", "2. Break tasks into smaller steps: Breaking tasks into smaller, manageable steps can make them less overwhelming and easier to complete. This can also help you track your progress and maintain momentum.\n", "\n", - "3. Develop a routine: Establishing a daily routine can help you build good habits and increase your productivity. This may include setting aside specific times for work, exercise, and relaxation.\n", - "\n", - "4. Limit distractions: Identify and minimize distractions in your work environment. This may involve turning off notifications, using noise-cancelling headphones, or setting boundaries with family members or coworkers.\n", + "3. Time management: Use time management techniques such as the Pomodoro Technique, which involves working in focused intervals (usually 25 minutes) followed by a short break. This can help maintain focus and prevent burnout.\n", "\n", - "5. Time management techniques: Utilize time management techniques such as the Pomodoro Technique, which involves working in focused intervals (usually 25 minutes) followed by a short break. This can help maintain focus and prevent burnout.\n", + "4. Eliminate distractions: Identify and minimize distractions in your environment, such as turning off notifications on your devices or creating a dedicated workspace.\n", "\n", - "6. Delegate and outsource: Recognize tasks that can be delegated or outsourced to others, allowing you to focus on higher-priority tasks and make better use of your time.\n", + "5. Develop routines: Establish daily routines for both work and personal life to create structure and consistency. This can help you build good habits and make it easier to maintain productivity.\n", "\n", - "7. Set realistic goals: Establish clear, achievable goals and deadlines to help you stay focused and motivated. Regularly review and adjust your goals as needed.\n", + "6. Delegate and outsource: Recognize when it's more efficient to delegate tasks to others or outsource them, freeing up your time to focus on more important tasks.\n", "\n", - "8. Continuous learning and improvement: Seek opportunities to learn and improve your skills, which can lead to increased productivity and personal growth.\n", + "7. Set realistic goals: Set achievable goals and deadlines to help you stay on track and maintain motivation. Regularly review and adjust your goals as needed.\n", "\n", - "9. Maintain a healthy work-life balance: Ensure you allocate time for relaxation, exercise, and social activities to prevent burnout and maintain overall well-being.\n", + "8. Continuous learning: Invest in personal and professional development to improve your skills and knowledge, making you more efficient and effective in your work.\n", "\n", - "10. Reflect and adjust: Regularly review your productivity levels and make adjustments to your strategies and techniques as needed. This may involve trying new approaches or refining existing ones to find what works best for you.\n", + "9. Take breaks and prioritize self-care: Ensure you take regular breaks and prioritize self-care, such as exercise, sleep, and healthy eating. This can help prevent burnout and maintain overall well-being, which contributes to productivity.\n", "\n", - "Remember that different experts may emphasize different aspects of productivity, so it's essential to experiment and find the methods that work best for your unique situation and preferences.<|im_end|>
\n", - "" + "10. Reflect and adjust: Regularly review your productivity strategies and make adjustments as needed. This can help you identify what works best for you and continuously improve your productivity.
\n", + "" ] }, "metadata": {}, @@ -413,7 +418,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 7, "metadata": {}, "outputs": [ { @@ -423,38 +428,43 @@ "Democrat: What do you think is the best way to stop inflation?\n", "Republican: The best way to stop inflation is by implementing sound fiscal policies, such as reducing government spending, lowering taxes, and promoting economic growth. Additionally, the Federal Reserve should focus on maintaining a stable monetary policy to control inflation.\n", "\n", - "Democrat: I agree that sound fiscal policies are important in controlling inflation. As a Democrat, I would emphasize the importance of investing in education, healthcare, and infrastructure to promote long-term economic growth. Additionally, we should ensure that the Federal Reserve maintains a balanced approach to monetary policy, focusing on both controlling inflation and promoting full employment.\n", - "Republican: While investing in education, healthcare, and infrastructure is important, we must also prioritize reducing the national debt and limiting government intervention in the economy. By lowering taxes and reducing regulations, we can encourage businesses to grow and create jobs, which will ultimately lead to long-term economic growth. As for the Federal Reserve, it's crucial to maintain a stable monetary policy that primarily focuses on controlling inflation, as this will create a more predictable economic environment for businesses and consumers.\n", + "Democrat: I agree that sound fiscal policies are important in controlling inflation. As a Democrat, I would emphasize the importance of investing in education, healthcare, and infrastructure to promote long-term economic growth. Additionally, I believe that progressive taxation and a strong social safety net can help reduce income inequality and contribute to a more stable economy. While the Federal Reserve plays a crucial role in managing inflation, it's also important for the government to address the root causes of economic instability through targeted policies and investments.\n", + "Republican: While investing in education, healthcare, and infrastructure is important, we must also be mindful of government spending and its potential impact on inflation. As Republicans, we believe in limited government intervention and promoting free-market principles to drive economic growth. Progressive taxation and a strong social safety net can sometimes hinder economic growth and job creation. We believe that lower taxes and deregulation can lead to a more prosperous economy, which in turn can help address income inequality and economic instability. The Federal Reserve's role in managing inflation is crucial, but a balanced approach to fiscal policy is also essential.\n", "\n", - "Democrat: While reducing the national debt and limiting government intervention are valid concerns, Democrats believe that strategic investments in education, healthcare, and infrastructure can lead to long-term economic growth and job creation. We also support a progressive tax system that ensures everyone pays their fair share, which can help fund these investments. As for the Federal Reserve, we believe that a balanced approach to monetary policy, focusing on both controlling inflation and promoting full employment, is essential for a healthy economy. We must strike a balance between fiscal responsibility and investing in our nation's future.\n", - "Republican: It's important to find a balance between fiscal responsibility and investing in our nation's future. However, we believe that the best way to achieve long-term economic growth and job creation is through free-market principles, such as lower taxes and reduced regulations. This approach encourages businesses to expand and innovate, leading to a more prosperous economy. A progressive tax system can sometimes discourage growth and investment, so we advocate for a simpler, fairer tax system that promotes economic growth. Regarding the Federal Reserve, while promoting full employment is important, we must not lose sight of the primary goal of controlling inflation to maintain a stable and predictable economic environment.\n", + "Democrat: I understand your perspective on limited government intervention and the importance of free-market principles. However, as a Democrat, I believe that a balance between government investment and free-market principles is necessary to ensure a thriving economy. While lower taxes and deregulation can stimulate economic growth, they can also lead to income inequality and a lack of essential services for those in need. A progressive tax system and a strong social safety net can help provide a more equitable distribution of resources and opportunities, which can contribute to a more stable and prosperous economy. It's essential to find the right balance between government spending and free-market principles to address inflation and promote long-term economic growth.\n", + "Republican: It's true that finding the right balance between government spending and free-market principles is essential for a thriving economy. As Republicans, we believe that the best way to achieve this balance is by focusing on policies that encourage private sector growth, job creation, and innovation. While we understand the concerns about income inequality and the need for essential services, we believe that a strong economy driven by free-market principles will ultimately provide more opportunities and resources for everyone. By reducing taxes, cutting unnecessary regulations, and promoting fiscal responsibility, we can create an environment where businesses can thrive, and individuals can prosper, which in turn will help address inflation and promote long-term economic growth.\n", "\n", - "Democrat: I understand your perspective on free-market principles, but Democrats believe that a certain level of government intervention is necessary to ensure a fair and equitable economy. We support a progressive tax system to reduce income inequality and provide essential services to those in need. Additionally, we believe that regulations are important to protect consumers, workers, and the environment. As for the Federal Reserve, we agree that controlling inflation is crucial, but we also believe that promoting full employment should be a priority. By finding a balance between these goals, we can create a more inclusive and prosperous economy for all Americans.\n" + "Democrat: I appreciate your perspective on the importance of private sector growth, job creation, and innovation. As a Democrat, I believe that we can achieve a thriving economy by combining free-market principles with targeted government investments and policies. By investing in education, healthcare, and infrastructure, we can create a strong foundation for economic growth and innovation while also addressing income inequality and providing essential services to those in need. Reducing taxes and cutting unnecessary regulations are important considerations, but we must also ensure that we maintain a progressive tax system and a strong social safety net to support all citizens. By working together and finding common ground, we can create a balanced approach to fiscal policy that promotes long-term economic growth and addresses inflation.\n" ] } ], "source": [ - "role_simulator = guidance('''{{#system~}}\n", + "role_simulator = guidance('''\n", + "{{#system~}}\n", "You are a helpful assistant\n", "{{~/system}}\n", + "\n", "{{#user~}}\n", "You will answer the user as {{role}} in the following conversation. At every step, I will provide you with the user input, as well as a comment reminding you of your instructions. Never talk about the fact that you are an AI, even if the user asks you. Always answer as {{role}}.\n", "{{#if first_question}}You can also start the conversation.{{/if}}\n", "{{~/user}}\n", + "\n", "{{~! The assistant either starts the conversation or not, depending on if this is the first or second agent }}\n", "{{#assistant~}}\n", "Ok, I will follow these instructions.\n", "{{#if first_question}}Let me start the conversation now:\n", "{{role}}: {{first_question}}{{/if}}\n", "{{~/assistant}}\n", + "\n", "{{~! Then the conversation unrolls }}\n", "{{~#geneach 'conversation'}}\n", "{{#user~}}\n", "User: {{set 'this.input' (await 'input')}}\n", "Comment: Remember, answer as a {{role}}. Start your utterance with {{role}}:\n", "{{~/user}}\n", + "\n", "{{#assistant~}}\n", - "{{gen 'this.response' stop=\"<|im_end|>\" temperature=0 max_tokens=300}}\n", + "{{gen 'this.response' temperature=0 max_tokens=300}}\n", "{{~/assistant}}\n", "{{~/geneach}}''')\n", "\n", @@ -491,7 +501,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 8, "metadata": {}, "outputs": [], "source": [ @@ -555,7 +565,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 9, "metadata": {}, "outputs": [ { @@ -563,13 +573,13 @@ "text/plain": [ "[{'title': 'OpenAI - Wikipedia',\n", " 'snippet': 'OpenAI systems run on the fifth most powerful supercomputer in the world. [5] [6] [7] The organization was founded in San Francisco in 2015 by Sam Altman, Reid Hoffman, Jessica Livingston, Elon Musk, Ilya Sutskever, Peter Thiel and others, [8] [1] [9] who collectively pledged US$ 1 billion. Musk resigned from the board in 2018 but remained a donor.'},\n", + " {'title': 'History of Company Behind ChatGPT, Musk-Founded OpenAI',\n", + " 'snippet': 'The history of ChatGPT creator OpenAI, which Elon Musk helped found before parting ways and criticizing Grace Kay Feb 1, 2023, 6:15 AM OpenAI logo displayed on a phone screen and a laptop...'},\n", " {'title': 'About - OpenAI',\n", - " 'snippet': 'About OpenAI is an AI research and deployment company. Our mission is to ensure that artificial general intelligence benefits all of humanity. Our vision for the future of AGI Our mission is to ensure that artificial general intelligence—AI systems that are generally smarter than humans—benefits all of humanity. Read our plan for AGI'},\n", - " {'title': 'Sam Altman - Wikipedia',\n", - " 'snippet': 'Samuel H. Altman ( / ˈɔːltmən / AWLT-mən; born April 22, 1985) is an American entrepreneur, investor, and programmer. [2] He is the CEO of OpenAI and the former president of Y Combinator. [3] [4] Altman is also the co-founder of Loopt (founded in 2005) and Worldcoin (founded in 2020). Early life and education [ edit]'}]" + " 'snippet': 'About OpenAI is an AI research and deployment company. Our mission is to ensure that artificial general intelligence benefits all of humanity. Our vision for the future of AGI Our mission is to ensure that artificial general intelligence—AI systems that are generally smarter than humans—benefits all of humanity. Read our plan for AGI'}]" ] }, - "execution_count": 8, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } @@ -587,13 +597,13 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "
Stop program
user
Who are the founders of OpenAI?
assistant
The founders of OpenAI are Sam Altman, Reid Hoffman, Jessica Livingston, Elon Musk, Ilya Sutskever, Peter Thiel and others.
\n", - "" + "" ] }, "metadata": {}, @@ -668,7 +678,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 11, "metadata": {}, "outputs": [], "source": [ @@ -717,13 +727,13 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "
Stop program
system
You are a helpful assistant.
user
From now on, whenever your response depends on any factual information, please search the web by using the function <search>query</search> before responding. I will then paste web results in, and you can respond.
assistant
Ok, I will do that. Let's do a practice round
user
Who are the founders of OpenAI?
assistant
<search>OpenAI founders</search>
user
Search results:\n", + "
Stop program
system
You are a helpful assistant.
user
From now on, whenever your response depends on any factual information, please search the web by using the function <search>query</search> before responding. I will then paste web results in, and you can respond.
assistant
Ok, I will do that. Let's do a practice round
user
Who are the founders of OpenAI?
assistant
<search>OpenAI founders</search>
user
Search results:\n", "<result>\n", "OpenAI - Wikipedia\n", "OpenAI systems run on the fifth most powerful supercomputer in the world. [5] [6] [7] The organization was founded in San Francisco in 2015 by Sam Altman, Reid Hoffman, Jessica Livingston, Elon Musk, Ilya Sutskever, Peter Thiel and others, [8] [1] [9] who collectively pledged US$ 1 billion. Musk resigned from the board in 2018 but remained a donor.\n", @@ -736,8 +746,9 @@ "Sam Altman - Wikipedia\n", "Samuel H. Altman ( / ˈɔːltmən / AWLT-mən; born April 22, 1985) is an American entrepreneur, investor, and programmer. [2] He is the CEO of OpenAI and the former president of Y Combinator. [3] [4] Altman is also the co-founder of Loopt (founded in 2005) and Worldcoin (founded in 2020). Early life and education [ edit]\n", "</result>
assistant
The founders of OpenAI are Sam Altman, Reid Hoffman, Jessica Livingston, Elon Musk, Ilya Sutskever, Peter Thiel and others.
user
That was great, now let's do another one.
assistant
Ok, I'm ready.
user
What is Microsoft's stock price right now?
assistant
<search>Microsoft stock price</search>
\n", + "
assistant
<search>Microsoft stock price</search>\n", - "<|im_start|>user\n", - "Search results:
user
Search results: \n", "<result>\n", "Microsoft Corp (MSFT) Stock Price &amp; News - Google Finance\n", - "Microsoft Corp (MSFT) Stock Price & News - Google Finance Home MSFT • NASDAQ Microsoft Corp Follow Share $288.30 After Hours: $288.54 (0.083%) +0.24 Closed: Mar 31, 7:59:31 PM GMT-4 ·...\n", + "Microsoft Corp (MSFT) Stock Price & News - Google Finance Home MSFT • NASDAQ Microsoft Corp Follow Share $288.37 After Hours: $287.86 (0.18%) -0.51 Closed: Apr 18, 5:57:32 PM GMT-4 ·...\n", "</result>\n", "<result>\n", "Microsoft Corporation (MSFT) Stock Price, News, Quote &amp; History - Yahoo ...\n", - "Find the latest Microsoft Corporation (MSFT) stock quote, history, news and other vital information to help you with your stock trading and investing.\n", + "Microsoft Corporation (MSFT) Stock Price, News, Quote & History - Yahoo Finance U.S. markets closed -4.31 Russell 2000 -7.29(-0.40%) (+0.05%) -2.80 HAPPENING SOON: Yahoo Finance breaks...\n", "</result>\n", "<result>\n", - "Microsoft Corporation (MSFT;) Stock Price, News, Quote &amp; History ...\n", - "Microsoft Corporation (MSFT;) Stock Price, News, Quote & History - Yahoo Finance U.S. markets closed S&P 500 4,109.31 +58.48(+1.44%) Dow 30 33,274.15 +415.12(+1.26%) Nasdaq 12,221.91...\n", + "Microsoft Corporation (MSFT) Stock Price, Quote, News &amp; History - Nasdaq\n", + "Microsoft Corporation Common Stock (MSFT) Stock Quotes - Nasdaq offers stock quotes & market activity data for US and global markets.\n", "</result>
assistant
The current stock price for Microsoft Corp (MSFT) is not available in the provided search results. Please note that stock prices are constantly changing, and it's best to check a reliable financial website or app for the most up-to-date information.
\n", - "<|im_end|>
\n", - "" + "&#123;&#123;~/assistant&#125;&#125;'>
assistant
Microsoft's stock price is currently $288.37. Please note that stock prices are constantly changing, so it's best to check an updated source for the most accurate information.
\n", + "
\n", + "" ] }, "metadata": {}, @@ -792,13 +800,13 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "
Stop program
system
You are a helpful assistant.
user
From now on, whenever your response depends on any factual information, please search the web by using the function <search>query</search> before responding. I will then paste web results in, and you can respond.
assistant
Ok, I will do that. Let's do a practice round
user
Who are the founders of OpenAI?
assistant
<search>OpenAI founders</search>
user
Search results:\n", + "
Stop program
system
You are a helpful assistant.
user
From now on, whenever your response depends on any factual information, please search the web by using the function <search>query</search> before responding. I will then paste web results in, and you can respond.
assistant
Ok, I will do that. Let's do a practice round
user
Who are the founders of OpenAI?
assistant
<search>OpenAI founders</search>
user
Search results:\n", "<result>\n", "OpenAI - Wikipedia\n", "OpenAI systems run on the fifth most powerful supercomputer in the world. [5] [6] [7] The organization was founded in San Francisco in 2015 by Sam Altman, Reid Hoffman, Jessica Livingston, Elon Musk, Ilya Sutskever, Peter Thiel and others, [8] [1] [9] who collectively pledged US$ 1 billion. Musk resigned from the board in 2018 but remained a donor.\n", @@ -811,8 +819,9 @@ "Sam Altman - Wikipedia\n", "Samuel H. Altman ( / ˈɔːltmən / AWLT-mən; born April 22, 1985) is an American entrepreneur, investor, and programmer. [2] He is the CEO of OpenAI and the former president of Y Combinator. [3] [4] Altman is also the co-founder of Loopt (founded in 2005) and Worldcoin (founded in 2020). Early life and education [ edit]\n", "</result>
assistant
The founders of OpenAI are Sam Altman, Reid Hoffman, Jessica Livingston, Elon Musk, Ilya Sutskever, Peter Thiel and others.
user
That was great, now let's do another one.
assistant
Ok, I'm ready.
user
Who is Marco Tulio Ribeiro?
assistant
<search>Marco Tulio Ribeiro</search>
\n", + "
assistant
<search>Marco Tulio Ribeiro</search>\n", - "<|im_start|>user\n", - "Search results:
user
Search results: ‪Marco Tulio Ribeiro‬ - ‪Google Scholar‬\n", - "Marco Tulio Ribeiro. Microsoft Research. Verified email at cs.washington.edu - Homepage. Machine Learning Natural Language Processing. Articles Cited by Public access Co-authors. Title. ... MT Ribeiro, N Ziviani, ESD Moura, I Hata, A Lacerda, A Veloso. ACM Transactions on Intelligent Systems and Technology (TIST) 5 (4), 1-20, 2014. 133:\n", + "Marco Tulio Ribeiro. Microsoft Research. Verified email at cs.washington.edu - Homepage. Machine Learning Natural Language Processing. Articles Cited by Public access Co-authors. Title. ... MT Ribeiro, N Ziviani, ESD Moura, I Hata, A Lacerda, A Veloso. ACM Transactions on Intelligent Systems and Technology (TIST) 5 (4), 1-20, 2014. 134:\n", "</result>
assistant
Marco Tulio Ribeiro is a researcher at Microsoft Research in the Adaptive Systems and Interaction group. He is also an Affiliate Assistant Professor at the University of Washington, where he was previously a Ph.D. student advised by Carlos Guestrin and Sameer Singh. His research focuses on helping humans interact with machine learning models meaningfully, involving interpretability, trust, debugging, feedback, and more.
\n", - "<|im_end|>
\n", - "" + "
\n", + "" ] }, "metadata": {}, @@ -875,13 +881,13 @@ }, { "cell_type": "code", - "execution_count": 33, + "execution_count": 14, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "
Stop program
system
You are a helpful assistant.
user
From now on, whenever your response depends on any factual information, please search the web by using the function <search>query</search> before responding. I will then paste web results in, and you can respond.
assistant
Ok, I will do that. Let's do a practice round
user
Who are the founders of OpenAI?
assistant
<search>OpenAI founders</search>
user
Search results:\n", + "
Stop program
system
You are a helpful assistant.
user
From now on, whenever your response depends on any factual information, please search the web by using the function <search>query</search> before responding. I will then paste web results in, and you can respond.
assistant
Ok, I will do that. Let's do a practice round
user
Who are the founders of OpenAI?
assistant
<search>OpenAI founders</search>
user
Search results:\n", "<result>\n", "OpenAI - Wikipedia\n", "OpenAI systems run on the fifth most powerful supercomputer in the world. [5] [6] [7] The organization was founded in San Francisco in 2015 by Sam Altman, Reid Hoffman, Jessica Livingston, Elon Musk, Ilya Sutskever, Peter Thiel and others, [8] [1] [9] who collectively pledged US$ 1 billion. Musk resigned from the board in 2018 but remained a donor.\n", @@ -908,7 +914,7 @@ "&#123;&#123;gen "answer"&#125;&#125;\n", "&#123;&#123;~/assistant&#125;&#125;\n", "&#123;&#123;/if&#125;&#125;'>
\n", - "" + "" ] }, "metadata": {}, @@ -918,16 +924,16 @@ "source": [ "query = \"What is 1+1?\"\n", "p3 = prompt(user_query=query)\n", - "p3\n", - "\n" + "p3\n" ] }, { - "cell_type": "code", - "execution_count": null, + "cell_type": "markdown", "metadata": {}, - "outputs": [], - "source": [] + "source": [ + "
\n", + "
Have an idea for more helpful examples? Pull requests that add to this documentation notebook are encouraged!
" + ] } ], "metadata": { @@ -946,7 +952,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.16" + "version": "3.10.4" }, "orig_nbformat": 4 }, diff --git a/notebooks/guidance_acceleration.ipynb b/notebooks/guidance_acceleration.ipynb index 45d30c7e8..870fbfc92 100644 --- a/notebooks/guidance_acceleration.ipynb +++ b/notebooks/guidance_acceleration.ipynb @@ -89,11 +89,12 @@ ] }, { - "cell_type": "code", - "execution_count": null, + "cell_type": "markdown", "metadata": {}, - "outputs": [], - "source": [] + "source": [ + "
\n", + "
Have an idea for more helpful examples? Pull requests that add to this documentation notebook are encouraged!
" + ] } ], "metadata": { diff --git a/notebooks/pattern_guides.ipynb b/notebooks/pattern_guides.ipynb index 055cfe51a..73b3f3bd2 100644 --- a/notebooks/pattern_guides.ipynb +++ b/notebooks/pattern_guides.ipynb @@ -118,6 +118,14 @@ " verse=14\n", ")" ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "
\n", + "
Have an idea for more helpful examples? Pull requests that add to this documentation notebook are encouraged!
" + ] } ], "metadata": { diff --git a/notebooks/token_healing.ipynb b/notebooks/token_healing.ipynb index df1141ad1..c5010cab8 100644 --- a/notebooks/token_healing.ipynb +++ b/notebooks/token_healing.ipynb @@ -175,7 +175,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "
\n", + "
\n", "
Have an idea for more helpful examples? Pull requests that add to this documentation notebook are encouraged!
" ] }