Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor bugs in babyagi.py and meta_prompting.py example scripts #353

Closed
HerrIvan opened this issue Nov 12, 2023 · 0 comments · Fixed by #354
Closed

Minor bugs in babyagi.py and meta_prompting.py example scripts #353

HerrIvan opened this issue Nov 12, 2023 · 0 comments · Fixed by #354
Labels

Comments

@HerrIvan
Copy link
Contributor

Describe the issue as clearly as possible:

There a couple of easy fixable in those two sample scripts.

  • baby_agi: the scripts does not call the two defined formatting functions. That causes an exception to be triggered.

  • meta_prompting: some misplaced or missing stop criteria prevent the model to generate complete answers.

Steps/code to reproduce the bug:

python babyagi.py
python meta_prompting.py

Expected result:

babyagi.py:
----
*****TASK LIST*****

 • Find a repeatable, low-maintainance, scalable business.

*****NEXT TASK*****

Educate yourself on the basics of investment and finance to enhance your understanding of index funds, ETFs,

*****TASK RESULT*****

To achieve your objective of becoming rich while doing nothing, I recommend exploring the following business idea: 

Investing in index funds or exchange-traded funds (ETFs). This approach requires minimal effort and provides a passive income stream. Index funds are designed to track the performance of a particular market index, such as the S&P 500, while ETFs are similar but can be bought and sold throughout the trading day like stocks. By investing in a diverse range of index funds or ETFs, you can benefit from overall market growth and minimize the risk associated with individual stocks. 

To make this business scalable, you can gradually increase your investment portfolio by allocating a percentage of your income towards index funds or ETFs regularly. Implementing an automatic investing plan, such as setting up automatic monthly contributions, allows you to invest consistently without any manual effort. By reinvesting any dividends received, your investment can compound over time and potentially generate substantial returns.

It is important to note that investing in the stock market carries some level of risk, and past performance is not indicative of future results.

*****TASK LIST*****

 • Develop a financial plan to allocate a percentage of your income towards index funds or ETFs regularly, considering factors such as risk tolerance, financial goals, and time horizon.
...
---

meta_prompting.py
for instance, the second example
---
Directions: In the following question, a related pair of words or phrases is followed by five pairs of words or phrases. Choose the pair that best expresses a relationship similar to that in the original pair. 
BRAGGART :: MODESTY
A) FLEDGLING : EXPERIENCE
B) EMBEZZLER : GREED
C) WALLFLOWER : TIMIDITY
D) INVALID : MALADY
E) CANDIDATE : AMBITION

    
Let's solve this problem by splitting it into steps.Step 1: Identify the relationship between the original pair of words/phrases.
In this case, the relationship between "braggart" and "modesty" is that they are opposites of each other. A braggart is someone who boasts or brags excessively, while modesty refers to being humble or not drawing attention to oneself.

Step 2: Compare the relationship between the original pair to the given options.
A) FLEDGLING : EXPERIENCE - This pair does not show a similar relationship as the original pair. Fledgling refers to a young or inexperienced person, while experience refers to knowledge gained over time.
B) EMBEZZLER : GREED - This pair does not show a similar relationship as the original pair. An embezzler refers to someone who steals money entrusted to them, while greed refers to excessive wanting or desire for something.
C) WALLFLOWER : TIMIDITY - This pair shows a similar relationship as the original pair. A wallflower refers to someone who is shy or socially reserved, while timidity refers to the quality of being shy or lacking in self-confidence.
D) INVALID : MALADY - This pair does not show a similar relationship as the original pair. An invalid refers to a person who is too sick or weak to care for themselves, while malady refers to a disease or ailment.
E) CANDIDATE : AMBITION - This pair does not show a similar relationship as the original pair. A candidate refers to a person who is applying for a job or position, while ambition refers to a strong desire or determination to achieve something.

Step 3: Choose the pair that best expresses a relationship similar to that in the original pair.
The pair that best expresses a relationship similar to that in the original pair is C) WALLFLOWER : TIMIDITY.
---
Note that gpt-3.5 doesn't get it straight, but at least outputs all it has to output.

Error message:

for babyagi.py
---
Traceback (most recent call last):
  File "/Users/***/outlines/examples/babyagi.py", line 153, in <module>
    print("" + str(t["task_name"]))

---
for meta_prompt.py, no bug, but responses are truncated
---
...
Let's solve this problem by splitting it into steps.Step 1: Identify the relationship in the original pair.
The original pair is "BRAGGART :: MODESTY". A braggart is someone who boasts or brags about their achievements or abilities, while modesty refers to the quality of being humble and not boastful. Therefore, the relationship in the original pair is that of opposites.

Step 2: Analyze the given pairs of words or phrases.
A) FLEDGLING : EXPERIENCE - Fledgling refers to someone who is inexperienced or new, while experience refers to knowledge or skill gained from doing something.
B) EMBEZZLER : GREED - An embezzler is someone who illegally takes or misappropriates funds or assets for personal gain, while greed refers to an intense desire for more wealth or possessions.
C) WALLFLOWER : TIMIDITY - A wallflower is someone who is shy or socially awkward and tends to avoid attention, while timidity refers to a lack of confidence or boldness.
D) INVALID : MALADY - An invalid
---
stopped in the middle of the output...

Outlines/Python version information:

Python 3.11.5 (main, Sep 11 2023, 08:31:25) [Clang 14.0.6 ]

"outlines" has no attribute version, but according to _version.py: 0.0.10dev13

Context for the issue:

These bugs are trivial to solve (I will shortly push the pull-request).

@HerrIvan HerrIvan added the bug label Nov 12, 2023
HerrIvan added a commit to HerrIvan/outlines that referenced this issue Nov 12, 2023
@rlouf rlouf linked a pull request Nov 12, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant