docs: setup docs for embedchain (#287)

This commit is contained in:
Deshraj Yadav
2023-07-16 16:33:30 -07:00
committed by GitHub
parent 05a4eef6ae
commit c595003481
21 changed files with 914 additions and 619 deletions

25
docs/advanced/testing.mdx Normal file
View File

@@ -0,0 +1,25 @@
---
title: '🧪 Testing'
---
Before you consume valueable tokens, you should make sure that the embedding you have done works and that it's receiving the correct document from the database.
For this you can use the `dry_run` method.
Following the example above, add this to your script:
```python
print(naval_chat_bot.dry_run('Can you tell me who Naval Ravikant is?'))
'''
Use the following pieces of context to answer the query at the end. If you don't know the answer, just say that you don't know, don't try to make up an answer.
Q: Who is Naval Ravikant?
A: Naval Ravikant is an Indian-American entrepreneur and investor.
Query: Can you tell me who Naval Ravikant is?
Helpful Answer:
'''
```
_The embedding is confirmed to work as expected. It returns the right document, even if the question is asked slightly different. No prompt tokens have been consumed._
**The dry run will still consume tokens to embed your query, but it is only ~1/15 of the prompt.**