Commit Graph

349 Commits

Author SHA1 Message Date
Harrison Chase
853894dd47
add moderation chain (#299) 2022-12-10 09:19:16 -08:00
andersenchen
5267ebce2d
Add LLMCheckerChain (#281)
Implementation of https://github.com/jagilley/fact-checker. Works pretty
well.

<img width="993" alt="Screenshot 2022-12-07 at 4 41 47 PM"
src="https://user-images.githubusercontent.com/101075607/206302751-356a19ff-d000-4798-9aee-9c38b7f532b9.png">

Verifying this manually:
1. "Only two kinds of egg-laying mammals are left on the planet
today—the duck-billed platypus and the echidna, or spiny anteater."
https://www.scientificamerican.com/article/extreme-monotremes/
2. "An [Echidna] egg weighs 1.5 to 2 grams (0.05 to 0.07
oz)[[19]](https://en.wikipedia.org/wiki/Echidna#cite_note-19) and is
about 1.4 centimetres (0.55 in) long."
https://en.wikipedia.org/wiki/Echidna#:~:text=sleep%20is%20suppressed.-,Reproduction,a%20reptile%2Dlike%20egg%20tooth.
3. "A [platypus] lays one to three (usually two) small, leathery eggs
(similar to those of reptiles), about 11 mm (7⁄16 in) in diameter and
slightly rounder than bird eggs."
https://en.wikipedia.org/wiki/Platypus#:~:text=It%20lays%20one%20to%20three,slightly%20rounder%20than%20bird%20eggs.
4. Therefore, an Echidna is the mammal that lays the biggest eggs.


cc @hwchase17
2022-12-09 12:49:05 -08:00
Harrison Chase
43c9bd869f
add memprompt docs (#294) 2022-12-09 12:40:24 -08:00
Ben
0f399350f1
Fix typo in Getting Started / LLM Chains docs (#291)
I noticed this typo when reading the getting started guide, hope this
fix makes sense.
2022-12-09 06:48:02 -08:00
Samantha Whitmore
b10be842f6
ChatGPT Clone: adding ConversationBufferWindowMemory to replicate vir… (#288)
…tual env example
2022-12-08 23:01:08 -08:00
Harrison Chase
e2e501aa06
Harrison/version 0032 (#283) 2022-12-08 07:59:58 -08:00
Harrison Chase
e9b1c8cdfa
Harrison/base combine doc chain (#264) 2022-12-07 22:56:26 -08:00
Harrison Chase
c27a6fa8a4
update docs (#278) 2022-12-07 08:40:08 -08:00
Harrison Chase
834b391792
update notebooks (#275) 2022-12-06 22:55:27 -08:00
coyotespike
b7bef36ee1
BashChain (#260)
Love the project, a ton of fun!

I think the PR is pretty self-explanatory, happy to make any changes! I
am working on using it in an `LLMBashChain` and may update as that
progresses.

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
2022-12-06 21:57:50 -08:00
Harrison Chase
28be37f470
LLMRequestsChain (#267) 2022-12-06 21:55:02 -08:00
Harrison Chase
5cd6956d58
Harrison/version 0028 (#259) 2022-12-04 17:44:40 -08:00
Harrison Chase
b5d8434a50
Harrison/improve chain docs (#251) 2022-12-03 13:28:50 -08:00
Scott Leibrand
b4762dfff0
Refine Olivia Wilde's boyfriend example prompt to work better (#248)
With the original prompt, the chain keeps trying to jump straight to
doing math directly, without first looking up ages. With this two-part
question, it behaves more as intended:


> Entering new ZeroShotAgent chain...
How old is Olivia Wilde's boyfriend? What is that number raised to the
0.23 power?
Thought: I need to find out how old Olivia Wilde's boyfriend is, and
then use a calculator to calculate the power.
Action: Search
Action Input: Olivia Wilde's boyfriend age
Observation: While Wilde, 37, and Styles, 27, have both kept a low
profile when it comes to talking about their relationship, Wilde did
address their ...
Thought: Olivia Wilde's boyfriend is 27 years old.
Action: Calculator
Action Input: 27^0.23

> Entering new LLMMathChain chain...
27^0.23

```python
import math
print(math.pow(27, 0.23))
```

Answer: 2.1340945944237553

> Finished LLMMathChain chain.

Observation: Answer: 2.1340945944237553

Thought: I now know the final answer.
Final Answer: 2.1340945944237553
> Finished ZeroShotAgent chain.
2022-12-03 08:11:38 -08:00
Harrison Chase
024c3e1dbe
add react text world doc (#245) 2022-12-02 09:07:21 -08:00
Harrison Chase
347fc49d4d
Harrison/combine documents chain (#212)
combine documents chain powering vector db qa with sources chain
2022-11-30 22:00:02 -08:00
Harrison Chase
3bda0019ae
Harrison/list of examples (#218) 2022-11-29 20:08:00 -08:00
Harrison Chase
ca2394028f
move search to not be a chain (#226) 2022-11-29 20:07:44 -08:00
Harrison Chase
b19a73be26
pal chain touch ups (#225)
expose PAL in main entrypoint
2022-11-29 18:13:21 -08:00
Harrison Chase
1b9b8efbc9
pal chain (#207)
from https://arxiv.org/pdf/2211.10435.pdf
2022-11-28 21:38:34 -08:00
Harrison Chase
03c7140228
fix self ask template (#216) 2022-11-28 17:27:26 -08:00
Harrison Chase
d4e6b7a692
Harrison/update docs mem (#201) 2022-11-26 06:38:49 -08:00
Harrison Chase
05c5d0b8ee
add custom prompt notebooks (#198) 2022-11-26 06:07:02 -08:00
Harrison Chase
fcb9b2ffe5
Harrison/agent memory (#197)
add doc for agent with memory
2022-11-26 06:06:44 -08:00
Harrison Chase
6eab5254e5
add docs for custom agents (#196) 2022-11-26 06:03:08 -08:00
Harrison Chase
08deed9002
Harrison/memory docs (#195)
update memory docs and change variables
2022-11-26 05:58:54 -08:00
Harrison Chase
f18a08f58d
add memory to llm chain notebook (#193) 2022-11-25 18:28:55 -08:00
Harrison Chase
c3ad99a34f
Harrison/more memory docs (#192) 2022-11-25 13:00:12 -05:00
Harrison Chase
b0feb3608b
documentation (#191) 2022-11-25 12:41:27 -05:00
Samantha Whitmore
a408ed3ea3
Samantha/add conversation chain (#166)
Add MemoryChain and ConversationChain as chains that take a docstore in
addition to the prompt, and use the docstore to stuff context into the
prompt. This can be used to have an ongoing conversation with a chatbot.

Probably needs a bit of refactoring for code quality

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
2022-11-23 16:35:38 -08:00
Samantha Whitmore
09f301cd38
Add add_example method to all ExampleSelector classes, with tests (#178)
Also updated docs, and noticed an issue with the add_texts method on
VectorStores that I had missed before -- the metadatas arg should be
required to match the classmethod which initializes the VectorStores
(the add_example methods break otherwise in the ExampleSelectors)
2022-11-23 13:12:47 -08:00
Harrison Chase
780ef84cf0
use action verb in documentation (#175) 2022-11-22 21:04:26 -08:00
Harrison Chase
5d887970f6
change to agent (#173) 2022-11-22 18:02:20 -08:00
Harrison Chase
d3a7429f61
(WIP) agents (#171) 2022-11-22 06:16:26 -08:00
Harrison Chase
4a4dfbfbed
Harrison/sequential chains (#168)
add support for basic sequential chains
2022-11-21 13:08:53 -08:00
Jim Salmons
e9baf9c134
Update llm.md (#164)
Without the print on the `llm` call, the new user sees no visible effect
when just getting started. The assumption here is the new user is
running this in a new sandbox script file or repl via copy-paste.
2022-11-20 15:22:53 -08:00
Harrison Chase
e49fc51492
Harrison/update docs (#162)
minor update to docs re imports
2022-11-20 07:18:43 -08:00
Harrison Chase
243211a5ae
bump version to 0017 (#161) 2022-11-20 07:04:09 -08:00
Harrison Chase
a19ad935b3
Harrison/verbose prompt (#159)
Add printing of prompt to LLMChain
2022-11-19 20:39:35 -08:00
Harrison Chase
c02eb199b6
add few shot example (#148) 2022-11-19 20:32:45 -08:00
Harrison Chase
b15c84e19d
Harrison/chain lab (#156) 2022-11-18 05:50:02 -08:00
Harrison Chase
b1b6b27c5f
Harrison/redo docs (#130)
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2022-11-13 20:13:23 -08:00
Harrison Chase
5e76c12455
Harrison/fix docs (#115) 2022-11-10 08:59:51 -08:00
Harrison Chase
a7d14cad00
add link to socratic models (#69) 2022-11-06 14:10:26 -08:00
Harrison Chase
618611f4dd
update glossary (#63) 2022-11-05 08:44:37 -07:00
Harrison Chase
8f907161e3
Harrison/initial glossary (#61) 2022-11-04 08:02:21 -07:00
Harrison Chase
76aff023d7
FAISS and embedding support (#48)
also adds embeddings and an in memory docstore
2022-11-01 21:29:39 -07:00
Harrison Chase
5621ca7b07
Harrison/more documentation (#19) 2022-10-24 20:24:15 -07:00
Harrison Chase
18aeb72012 initial commit 2022-10-24 14:51:15 -07:00