Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,7 +14,8 @@ from langchain_community.retrievers import BM25Retriever
|
|
| 14 |
from langchain_community.vectorstores import FAISS
|
| 15 |
from langchain_core.embeddings import Embeddings
|
| 16 |
from langchain_core.documents import Document
|
| 17 |
-
from collections import
|
|
|
|
| 18 |
import hashlib
|
| 19 |
from tqdm import tqdm
|
| 20 |
from dotenv import load_dotenv
|
|
@@ -212,10 +213,10 @@ class EnhancedRetriever:
|
|
| 212 |
|
| 213 |
# --- Generation System ---
|
| 214 |
SYSTEM_PROMPT = """**Biomimicry Expert Guidelines**
|
| 215 |
-
1. Base answers strictly on context
|
| 216 |
-
2. Cite sources as [Source]
|
| 217 |
3. **Bold** technical terms
|
| 218 |
-
4. Include reference links
|
| 219 |
|
| 220 |
Context: {context}"""
|
| 221 |
|
|
|
|
| 14 |
from langchain_community.vectorstores import FAISS
|
| 15 |
from langchain_core.embeddings import Embeddings
|
| 16 |
from langchain_core.documents import Document
|
| 17 |
+
from collections import
|
| 18 |
+
defaultdict
|
| 19 |
import hashlib
|
| 20 |
from tqdm import tqdm
|
| 21 |
from dotenv import load_dotenv
|
|
|
|
| 213 |
|
| 214 |
# --- Generation System ---
|
| 215 |
SYSTEM_PROMPT = """**Biomimicry Expert Guidelines**
|
| 216 |
+
1. Firstly Base answers strictly on context and if there is not context answer by your own.
|
| 217 |
+
2. Cite sources as [Source] witht the hyperlink
|
| 218 |
3. **Bold** technical terms
|
| 219 |
+
4. Include reference links at the end of the response
|
| 220 |
|
| 221 |
Context: {context}"""
|
| 222 |
|