zakerytclarke
commited on
Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
# Teapot AI Instruct Documentation
|
3 |
+
|
4 |
+
The `teapot-instruct` model is fine-tuned for optimized web-based Retrieval-Augmented Generation (RAG) question answering. Designed for browser environments, it efficiently retrieves, synthesizes, and answers queries based on web content.
|
5 |
+
|
6 |
+
## Overview
|
7 |
+
|
8 |
+
Teapot AI Instruct is ideal for:
|
9 |
+
- **Question Answering (QA)**: Extracting answers from web pages.
|
10 |
+
- **RAG**: Combining retrieval and generation to answer complex questions.
|
11 |
+
- **Summarization**: Condensing web content.
|
12 |
+
- **Translation**: Translating between langauges.
|
13 |
+
|
14 |
+
### Example Usage
|
15 |
+
|
16 |
+
```javascript
|
17 |
+
import { pipeline, env } from '@xenova/transformers';
|
18 |
+
|
19 |
+
const generative_model = await pipeline('text2text-generation', 'teapotai/instruct-teapot');
|
20 |
+
|
21 |
+
// Example context from an article (similar to SQuAD)
|
22 |
+
const context = \`
|
23 |
+
The Amazon Rainforest, also known as Amazonia, is a large tropical rainforest occupying the drainage basin of the Amazon River
|
24 |
+
and its tributaries in northern South America, and covering an area of 6,000,000 square kilometers (2,300,000 sq mi).
|
25 |
+
Comprising about 40% of Brazil's total area, it is bordered by the Guiana Highlands to the north, the Andes Mountains to the west,
|
26 |
+
the Brazilian Central Plateau to the south, and the Atlantic Ocean to the east.
|
27 |
+
\`;
|
28 |
+
|
29 |
+
const query = "What percentage of Brazil's total area does the Amazon Rainforest cover?";
|
30 |
+
const result = await generative_model(\`\${context}
|
31 |
+
\${query}\`);
|
32 |
+
|
33 |
+
console.log(result); // 40%
|
34 |
+
```
|
35 |
+
|
36 |
+
### Features
|
37 |
+
|
38 |
+
- **Web-Optimized**: Tailored for browser-based QA and generation tasks.
|
39 |
+
- **RAG Capability**: Integrates retrieval with generative responses.
|
40 |
+
- **Lightweight Deployment**: Low latency, high performance in browser environments.
|
41 |
+
- **Zero Setup**: Client-side integration with no server requirements.
|
42 |
+
|
43 |
+
### Use Cases
|
44 |
+
|
45 |
+
- **Browser-based RAG**: Real-time QA within web apps.
|
46 |
+
- **Web Scraping and QA**: Generate answers from web content.
|
47 |
+
- **Summarization**: Summarize web pages efficiently.
|
48 |
+
|
49 |
+
### Model Performance
|
50 |
+
|
51 |
+
Teapot AI Instruct is fine-tuned with a large web-based corpus, excelling in:
|
52 |
+
- Accurate, context-aware answers.
|
53 |
+
- Summarization of long-form text with relevant content focus.
|
54 |
+
|
55 |
+
### Integration with Browser-Based LLM Agents
|
56 |
+
|
57 |
+
Teapot AI Instruct integrates seamlessly with agents like **Teapot AI** for:
|
58 |
+
- Web scraping.
|
59 |
+
- Real-time browser-based QA.
|
60 |
+
- Summarization and code completion.
|