Spaces:
Sleeping
Sleeping
Asaad Almutareb
commited on
Commit
·
5c11631
1
Parent(s):
8ba1a3e
deleted old files
Browse files- Core_Advanced_RAG_components.ipynb +0 -392
- docs/advanced_rag_architecture.drawio +0 -115
- docs/data_flow_diagram.drawio.png +0 -0
- mail_automation_draft.drawio +0 -140
- requirements.txt +1 -1
Core_Advanced_RAG_components.ipynb
DELETED
|
@@ -1,392 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"nbformat": 4,
|
| 3 |
-
"nbformat_minor": 0,
|
| 4 |
-
"metadata": {
|
| 5 |
-
"colab": {
|
| 6 |
-
"provenance": [],
|
| 7 |
-
"gpuType": "T4",
|
| 8 |
-
"authorship_tag": "ABX9TyNTRxOWLfv3tkZHe66pK63p",
|
| 9 |
-
"include_colab_link": true
|
| 10 |
-
},
|
| 11 |
-
"kernelspec": {
|
| 12 |
-
"name": "python3",
|
| 13 |
-
"display_name": "Python 3"
|
| 14 |
-
},
|
| 15 |
-
"language_info": {
|
| 16 |
-
"name": "python"
|
| 17 |
-
},
|
| 18 |
-
"accelerator": "GPU"
|
| 19 |
-
},
|
| 20 |
-
"cells": [
|
| 21 |
-
{
|
| 22 |
-
"cell_type": "markdown",
|
| 23 |
-
"metadata": {
|
| 24 |
-
"id": "view-in-github",
|
| 25 |
-
"colab_type": "text"
|
| 26 |
-
},
|
| 27 |
-
"source": [
|
| 28 |
-
"<a href=\"https://colab.research.google.com/github/almutareb/advanced-rag-system-anatomy/blob/main/Core_Advanced_RAG_components.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
|
| 29 |
-
]
|
| 30 |
-
},
|
| 31 |
-
{
|
| 32 |
-
"cell_type": "markdown",
|
| 33 |
-
"source": [
|
| 34 |
-
"Install requirements"
|
| 35 |
-
],
|
| 36 |
-
"metadata": {
|
| 37 |
-
"id": "Hz8JZq6Ob8rt"
|
| 38 |
-
}
|
| 39 |
-
},
|
| 40 |
-
{
|
| 41 |
-
"cell_type": "code",
|
| 42 |
-
"source": [
|
| 43 |
-
"import sys\n",
|
| 44 |
-
"import os\n",
|
| 45 |
-
"!pip install -qU langchain langchain-community --no-warn-script-location > /dev/null\n",
|
| 46 |
-
"!pip install -qU beautifulsoup4 --no-warn-script-location > /dev/null\n",
|
| 47 |
-
"!pip install -qU faiss-cpu --no-warn-script-location > /dev/null\n",
|
| 48 |
-
"# use the gpu optimized version of FAISS for better performance\n",
|
| 49 |
-
"#!pip install -qU faiss-gpu --no-warn-script-location > /dev/null\n",
|
| 50 |
-
"!pip install -qU chromadb --no-warn-script-location > /dev/null\n",
|
| 51 |
-
"!pip install -qU validators --no-warn-script-location > /dev/null\n",
|
| 52 |
-
"!pip install -qU sentence_transformers typing-extensions==4.8.0 unstructured --no-warn-script-location > /dev/null\n",
|
| 53 |
-
"!pip install -qU gradio==3.48.0 --no-warn-script-location > /dev/null"
|
| 54 |
-
],
|
| 55 |
-
"metadata": {
|
| 56 |
-
"id": "SXTdFuTvboyV"
|
| 57 |
-
},
|
| 58 |
-
"execution_count": null,
|
| 59 |
-
"outputs": []
|
| 60 |
-
},
|
| 61 |
-
{
|
| 62 |
-
"cell_type": "markdown",
|
| 63 |
-
"source": [
|
| 64 |
-
"Download Documents"
|
| 65 |
-
],
|
| 66 |
-
"metadata": {
|
| 67 |
-
"id": "pETUBgFAk4Fx"
|
| 68 |
-
}
|
| 69 |
-
},
|
| 70 |
-
{
|
| 71 |
-
"cell_type": "code",
|
| 72 |
-
"source": [
|
| 73 |
-
"from langchain.document_loaders.recursive_url_loader import RecursiveUrlLoader\n",
|
| 74 |
-
"from bs4 import BeautifulSoup as Soup\n",
|
| 75 |
-
"\n",
|
| 76 |
-
"# List of URLs to scrape\n",
|
| 77 |
-
"urls = [\"https://langchain-doc.readthedocs.io/en/latest\"\n",
|
| 78 |
-
" \"https://python.langchain.com/docs/get_started\"]\n",
|
| 79 |
-
"\n",
|
| 80 |
-
"# Initialize an empty list to store the documents\n",
|
| 81 |
-
"docs = []\n",
|
| 82 |
-
"# Looping through each URL in the list - this could take some time!\n",
|
| 83 |
-
"for url in urls:\n",
|
| 84 |
-
" # max_depth set to 2 for demo purpose, should be increased for real scenario results, e.g. at least 5\n",
|
| 85 |
-
" loader = RecursiveUrlLoader(url=url, max_depth=4, extractor=lambda x: Soup(x, \"html.parser\").text)\n",
|
| 86 |
-
" docs.extend(loader.load())\n",
|
| 87 |
-
"print(f'Downloaded a total of {len(docs)} documents')"
|
| 88 |
-
],
|
| 89 |
-
"metadata": {
|
| 90 |
-
"id": "eVav9lGgk3X3"
|
| 91 |
-
},
|
| 92 |
-
"execution_count": null,
|
| 93 |
-
"outputs": []
|
| 94 |
-
},
|
| 95 |
-
{
|
| 96 |
-
"cell_type": "markdown",
|
| 97 |
-
"source": [
|
| 98 |
-
"Chunking documents"
|
| 99 |
-
],
|
| 100 |
-
"metadata": {
|
| 101 |
-
"id": "0iurKj94w1jm"
|
| 102 |
-
}
|
| 103 |
-
},
|
| 104 |
-
{
|
| 105 |
-
"cell_type": "code",
|
| 106 |
-
"source": [
|
| 107 |
-
"from langchain.text_splitter import RecursiveCharacterTextSplitter\n",
|
| 108 |
-
"import time\n",
|
| 109 |
-
"\n",
|
| 110 |
-
"text_splitter = RecursiveCharacterTextSplitter(\n",
|
| 111 |
-
" chunk_size = 500, # The size of each text chunk\n",
|
| 112 |
-
" chunk_overlap = 50, # Overlap between chunks to ensure continuity\n",
|
| 113 |
-
")\n",
|
| 114 |
-
"\n",
|
| 115 |
-
"# Stage one: read all the docs, split them into chunks.\n",
|
| 116 |
-
"st = time.time() # Start time for performance measurement\n",
|
| 117 |
-
"print('Loading documents ...')\n",
|
| 118 |
-
"\n",
|
| 119 |
-
"# Split each document into chunks using the configured text splitter\n",
|
| 120 |
-
"chunks = text_splitter.create_documents([doc.page_content for doc in docs], metadatas=[doc.metadata for doc in docs])\n",
|
| 121 |
-
"\n",
|
| 122 |
-
"et = time.time() - st # Calculate time taken for splitting\n",
|
| 123 |
-
"print(f'created {len(chunks)} chunks in {et} seconds.')"
|
| 124 |
-
],
|
| 125 |
-
"metadata": {
|
| 126 |
-
"id": "zSZJQeA_w2B3"
|
| 127 |
-
},
|
| 128 |
-
"execution_count": null,
|
| 129 |
-
"outputs": []
|
| 130 |
-
},
|
| 131 |
-
{
|
| 132 |
-
"cell_type": "markdown",
|
| 133 |
-
"source": [
|
| 134 |
-
"Build VectorStore: Vectorization"
|
| 135 |
-
],
|
| 136 |
-
"metadata": {
|
| 137 |
-
"id": "oQGtHuTxkmFq"
|
| 138 |
-
}
|
| 139 |
-
},
|
| 140 |
-
{
|
| 141 |
-
"cell_type": "code",
|
| 142 |
-
"source": [
|
| 143 |
-
"from langchain.vectorstores import FAISS\n",
|
| 144 |
-
"from langchain.vectorstores.utils import filter_complex_metadata\n",
|
| 145 |
-
"from langchain.embeddings import HuggingFaceEmbeddings\n",
|
| 146 |
-
"\n",
|
| 147 |
-
"# Path for saving the FAISS index\n",
|
| 148 |
-
"FAISS_INDEX_PATH = \"./vectorstore/lc-faiss-multi-mpnet-500\"\n",
|
| 149 |
-
"\n",
|
| 150 |
-
"\n",
|
| 151 |
-
"#Stage two: embed the docs.\n",
|
| 152 |
-
"# use multi-qa-mpnet-base-dot-v1 sentence transformer to convert pieces of text in vectors to store them in the vector store\n",
|
| 153 |
-
"model_name = \"sentence-transformers/multi-qa-mpnet-base-dot-v1\"\n",
|
| 154 |
-
"\n",
|
| 155 |
-
"# use the GPU for faster processing\n",
|
| 156 |
-
"#model_kwargs = {\"device\": \"cuda\"}\n",
|
| 157 |
-
"\n",
|
| 158 |
-
"# Initialize HuggingFace embeddings with the specified model\n",
|
| 159 |
-
"embeddings = HuggingFaceEmbeddings(\n",
|
| 160 |
-
" model_name=model_name,\n",
|
| 161 |
-
"# model_kwargs=model_kwargs # uncomment when using a GPU, like T4 - requires extended RAM!\n",
|
| 162 |
-
" )\n",
|
| 163 |
-
"\n",
|
| 164 |
-
"print(f'Loading chunks into vector store ...')\n",
|
| 165 |
-
"st = time.time() # Start time for performance measurement\n",
|
| 166 |
-
"\n",
|
| 167 |
-
"# Create a FAISS vector store from the document chunks and save it locally\n",
|
| 168 |
-
"db = FAISS.from_documents(filter_complex_metadata(chunks), embeddings)\n",
|
| 169 |
-
"# persist vectorstore\n",
|
| 170 |
-
"db.save_local(FAISS_INDEX_PATH)\n",
|
| 171 |
-
"\n",
|
| 172 |
-
"et = time.time() - st\n",
|
| 173 |
-
"print(f'Time taken: {et} seconds.')"
|
| 174 |
-
],
|
| 175 |
-
"metadata": {
|
| 176 |
-
"id": "qu6sDsq6c9fg"
|
| 177 |
-
},
|
| 178 |
-
"execution_count": null,
|
| 179 |
-
"outputs": []
|
| 180 |
-
},
|
| 181 |
-
{
|
| 182 |
-
"cell_type": "markdown",
|
| 183 |
-
"source": [
|
| 184 |
-
"Load LLM"
|
| 185 |
-
],
|
| 186 |
-
"metadata": {
|
| 187 |
-
"id": "updDdzwj0RdJ"
|
| 188 |
-
}
|
| 189 |
-
},
|
| 190 |
-
{
|
| 191 |
-
"cell_type": "code",
|
| 192 |
-
"source": [
|
| 193 |
-
"from dotenv import load_dotenv\n",
|
| 194 |
-
"# HF libraries\n",
|
| 195 |
-
"from langchain.llms import HuggingFaceHub\n",
|
| 196 |
-
"\n",
|
| 197 |
-
"# Load environment variables from a .env file\n",
|
| 198 |
-
"CONFIG = load_dotenv(\".env\")\n",
|
| 199 |
-
"\n",
|
| 200 |
-
"# Retrieve the Hugging Face API token from environment variables\n",
|
| 201 |
-
"HUGGINGFACEHUB_API_TOKEN = os.getenv('HUGGINGFACEHUB_API_TOKEN')\n",
|
| 202 |
-
"\n",
|
| 203 |
-
"# load HF Token\n",
|
| 204 |
-
"HUGGINGFACEHUB_API_TOKEN=os.getenv('HUGGINGFACEHUB_API_TOKEN')\n",
|
| 205 |
-
"\n",
|
| 206 |
-
"# Load the model from the Hugging Face Hub\n",
|
| 207 |
-
"model_id = HuggingFaceHub(repo_id=\"mistralai/Mistral-7B-Instruct-v0.1\", model_kwargs={\n",
|
| 208 |
-
" \"temperature\":0.1,\n",
|
| 209 |
-
" \"max_new_tokens\":1024,\n",
|
| 210 |
-
" \"repetition_penalty\":1.2,\n",
|
| 211 |
-
" \"return_full_text\":False\n",
|
| 212 |
-
" })\n"
|
| 213 |
-
],
|
| 214 |
-
"metadata": {
|
| 215 |
-
"id": "GlnNrNdbg2E6"
|
| 216 |
-
},
|
| 217 |
-
"execution_count": null,
|
| 218 |
-
"outputs": []
|
| 219 |
-
},
|
| 220 |
-
{
|
| 221 |
-
"cell_type": "markdown",
|
| 222 |
-
"source": [
|
| 223 |
-
"Retriever"
|
| 224 |
-
],
|
| 225 |
-
"metadata": {
|
| 226 |
-
"id": "2m3BIm090jtr"
|
| 227 |
-
}
|
| 228 |
-
},
|
| 229 |
-
{
|
| 230 |
-
"cell_type": "code",
|
| 231 |
-
"source": [
|
| 232 |
-
"from langchain.embeddings import HuggingFaceHubEmbeddings\n",
|
| 233 |
-
"# vectorestore\n",
|
| 234 |
-
"from langchain.vectorstores import FAISS\n",
|
| 235 |
-
"\n",
|
| 236 |
-
"# Load and Initialize the vector store as a retriever for the RAG pipeline\n",
|
| 237 |
-
"db = FAISS.load_local(FAISS_INDEX_PATH, embeddings)\n",
|
| 238 |
-
"\n",
|
| 239 |
-
"retriever = db.as_retriever()"
|
| 240 |
-
],
|
| 241 |
-
"metadata": {
|
| 242 |
-
"id": "jzqPsuds0kSs"
|
| 243 |
-
},
|
| 244 |
-
"execution_count": null,
|
| 245 |
-
"outputs": []
|
| 246 |
-
},
|
| 247 |
-
{
|
| 248 |
-
"cell_type": "markdown",
|
| 249 |
-
"source": [
|
| 250 |
-
"Template and Chat logic"
|
| 251 |
-
],
|
| 252 |
-
"metadata": {
|
| 253 |
-
"id": "Bld8lOEv0Uq-"
|
| 254 |
-
}
|
| 255 |
-
},
|
| 256 |
-
{
|
| 257 |
-
"cell_type": "code",
|
| 258 |
-
"source": [
|
| 259 |
-
"# retrieval chain\n",
|
| 260 |
-
"from langchain.chains import RetrievalQA\n",
|
| 261 |
-
"# prompt template\n",
|
| 262 |
-
"from langchain.prompts import PromptTemplate\n",
|
| 263 |
-
"from langchain.memory import ConversationBufferMemory\n",
|
| 264 |
-
"\n",
|
| 265 |
-
"\n",
|
| 266 |
-
"global qa\n",
|
| 267 |
-
"template = \"\"\"\n",
|
| 268 |
-
"You are the friendly documentation buddy Arti, who helps novice programmers in using LangChain with simple explanations and examples.\\\n",
|
| 269 |
-
" Use the following context (delimited by <ctx></ctx>) and the chat history (delimited by <hs></hs>) to answer the question :\n",
|
| 270 |
-
"------\n",
|
| 271 |
-
"<ctx>\n",
|
| 272 |
-
"{context}\n",
|
| 273 |
-
"</ctx>\n",
|
| 274 |
-
"------\n",
|
| 275 |
-
"<hs>\n",
|
| 276 |
-
"{history}\n",
|
| 277 |
-
"</hs>\n",
|
| 278 |
-
"------\n",
|
| 279 |
-
"{question}\n",
|
| 280 |
-
"Answer:\n",
|
| 281 |
-
"\"\"\"\n",
|
| 282 |
-
"# Create a PromptTemplate object with specified input variables and the defined template\n",
|
| 283 |
-
"prompt = PromptTemplate.from_template(\n",
|
| 284 |
-
" template=template,\n",
|
| 285 |
-
")\n",
|
| 286 |
-
"prompt.format(context=\"context\", history=\"history\", question=\"question\")\n",
|
| 287 |
-
"\n",
|
| 288 |
-
"# Create a memory buffer to manage conversation history\n",
|
| 289 |
-
"memory = ConversationBufferMemory(memory_key=\"history\", input_key=\"question\")\n",
|
| 290 |
-
"\n",
|
| 291 |
-
"# Initialize the RetrievalQA object with the specified model,\n",
|
| 292 |
-
"# retriever, and additional configurations\n",
|
| 293 |
-
"qa = RetrievalQA.from_chain_type(llm=model_id, chain_type=\"stuff\", retriever=retriever, verbose=True, return_source_documents=True, chain_type_kwargs={\n",
|
| 294 |
-
" \"verbose\": True,\n",
|
| 295 |
-
" \"memory\": memory,\n",
|
| 296 |
-
" \"prompt\": prompt\n",
|
| 297 |
-
"}\n",
|
| 298 |
-
" )"
|
| 299 |
-
],
|
| 300 |
-
"metadata": {
|
| 301 |
-
"id": "K255Ldxq0Xg6"
|
| 302 |
-
},
|
| 303 |
-
"execution_count": null,
|
| 304 |
-
"outputs": []
|
| 305 |
-
},
|
| 306 |
-
{
|
| 307 |
-
"cell_type": "markdown",
|
| 308 |
-
"source": [
|
| 309 |
-
"UI - Gradio"
|
| 310 |
-
],
|
| 311 |
-
"metadata": {
|
| 312 |
-
"id": "pA5d0LL2kObx"
|
| 313 |
-
}
|
| 314 |
-
},
|
| 315 |
-
{
|
| 316 |
-
"cell_type": "code",
|
| 317 |
-
"source": [
|
| 318 |
-
"history=[]\n",
|
| 319 |
-
"query=\"draft a function to calculate a mxn matrix\"\n",
|
| 320 |
-
"question=query\n",
|
| 321 |
-
"response=qa({\"query\": query, \"history\": history, \"question\": question})\n",
|
| 322 |
-
"print(*response)"
|
| 323 |
-
],
|
| 324 |
-
"metadata": {
|
| 325 |
-
"id": "bKeoyhXPrQ2C"
|
| 326 |
-
},
|
| 327 |
-
"execution_count": null,
|
| 328 |
-
"outputs": []
|
| 329 |
-
},
|
| 330 |
-
{
|
| 331 |
-
"cell_type": "code",
|
| 332 |
-
"source": [
|
| 333 |
-
"print(response['result'])"
|
| 334 |
-
],
|
| 335 |
-
"metadata": {
|
| 336 |
-
"id": "78wRMjjn0cl3"
|
| 337 |
-
},
|
| 338 |
-
"execution_count": null,
|
| 339 |
-
"outputs": []
|
| 340 |
-
},
|
| 341 |
-
{
|
| 342 |
-
"cell_type": "code",
|
| 343 |
-
"source": [
|
| 344 |
-
"import gradio as gr\n",
|
| 345 |
-
"\n",
|
| 346 |
-
"# Function to add a new input to the chat history\n",
|
| 347 |
-
"def add_text(history, text):\n",
|
| 348 |
-
" # Append the new text to the history with a placeholder for the response\n",
|
| 349 |
-
" history = history + [(text, None)]\n",
|
| 350 |
-
" return history, \"\"\n",
|
| 351 |
-
"\n",
|
| 352 |
-
"# Function representing the bot's response mechanism\n",
|
| 353 |
-
"def bot(history):\n",
|
| 354 |
-
" response = infer(history[-1][0], history)\n",
|
| 355 |
-
" history[-1][1] = response['result']\n",
|
| 356 |
-
" return history\n",
|
| 357 |
-
"\n",
|
| 358 |
-
"# Function to infer the response using the RAG model\n",
|
| 359 |
-
"def infer(question, history):\n",
|
| 360 |
-
" query = question\n",
|
| 361 |
-
" result = qa({\"query\": query, \"history\": history, \"question\": question})\n",
|
| 362 |
-
" return result\n",
|
| 363 |
-
"\n",
|
| 364 |
-
"# Building the Gradio interface\n",
|
| 365 |
-
"with gr.Blocks() as demo:\n",
|
| 366 |
-
" with gr.Column(elem_id=\"col-container\"):\n",
|
| 367 |
-
" chatbot = gr.Chatbot([], elem_id=\"chatbot\")\n",
|
| 368 |
-
" clear = gr.Button(\"Clear\")\n",
|
| 369 |
-
"\n",
|
| 370 |
-
" # Create a row for the question input\n",
|
| 371 |
-
" with gr.Row():\n",
|
| 372 |
-
" question = gr.Textbox(label=\"Question\", placeholder=\"Type your question and hit Enter \")\n",
|
| 373 |
-
"\n",
|
| 374 |
-
" # Define the action when the question is submitted\n",
|
| 375 |
-
" question.submit(add_text, [chatbot, question], [chatbot, question], queue=False).then(\n",
|
| 376 |
-
" bot, chatbot, chatbot\n",
|
| 377 |
-
" )\n",
|
| 378 |
-
"\n",
|
| 379 |
-
" # Define the action for the clear button\n",
|
| 380 |
-
" clear.click(lambda: None, None, chatbot, queue=False)\n",
|
| 381 |
-
"\n",
|
| 382 |
-
"# Launch the Gradio demo interface\n",
|
| 383 |
-
"demo.launch(share=False)"
|
| 384 |
-
],
|
| 385 |
-
"metadata": {
|
| 386 |
-
"id": "OHVkFa6MkCir"
|
| 387 |
-
},
|
| 388 |
-
"execution_count": null,
|
| 389 |
-
"outputs": []
|
| 390 |
-
}
|
| 391 |
-
]
|
| 392 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
docs/advanced_rag_architecture.drawio
DELETED
|
@@ -1,115 +0,0 @@
|
|
| 1 |
-
<mxfile host="app.diagrams.net" modified="2024-02-02T10:57:09.662Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:122.0) Gecko/20100101 Firefox/122.0" etag="jBjrxQrE8FMZUdqYmkDs" version="22.1.21" type="github">
|
| 2 |
-
<diagram id="C5RBs43oDa-KdzZeNtuy" name="Page-1">
|
| 3 |
-
<mxGraphModel dx="1434" dy="774" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
|
| 4 |
-
<root>
|
| 5 |
-
<mxCell id="WIyWlLk6GJQsqaUBKTNV-0" />
|
| 6 |
-
<mxCell id="WIyWlLk6GJQsqaUBKTNV-1" parent="WIyWlLk6GJQsqaUBKTNV-0" />
|
| 7 |
-
<mxCell id="7HGE-dyt3ShhVV6eNgTS-59" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="7HGE-dyt3ShhVV6eNgTS-4" target="7HGE-dyt3ShhVV6eNgTS-22">
|
| 8 |
-
<mxGeometry relative="1" as="geometry" />
|
| 9 |
-
</mxCell>
|
| 10 |
-
<mxCell id="7HGE-dyt3ShhVV6eNgTS-4" value="Retrieval System" style="swimlane;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;startSize=23;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
| 11 |
-
<mxGeometry x="280" y="360" width="290" height="280" as="geometry" />
|
| 12 |
-
</mxCell>
|
| 13 |
-
<mxCell id="7HGE-dyt3ShhVV6eNgTS-7" value="<div>Indicies</div>" style="strokeWidth=2;html=1;shape=mxgraph.flowchart.database;whiteSpace=wrap;fillColor=#ffe6cc;strokeColor=#d79b00;" vertex="1" parent="7HGE-dyt3ShhVV6eNgTS-4">
|
| 14 |
-
<mxGeometry x="44" y="40" width="60" height="60" as="geometry" />
|
| 15 |
-
</mxCell>
|
| 16 |
-
<mxCell id="7HGE-dyt3ShhVV6eNgTS-32" value="Re-ranking" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;fillColor=#e1d5e7;strokeColor=#9673a6;" vertex="1" parent="7HGE-dyt3ShhVV6eNgTS-4">
|
| 17 |
-
<mxGeometry x="14" y="130" width="120" height="40" as="geometry" />
|
| 18 |
-
</mxCell>
|
| 19 |
-
<mxCell id="7HGE-dyt3ShhVV6eNgTS-34" value="Hypothetical Questions and HyDE" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;fillColor=#e1d5e7;strokeColor=#9673a6;" vertex="1" parent="7HGE-dyt3ShhVV6eNgTS-4">
|
| 20 |
-
<mxGeometry x="160" y="130" width="120" height="40" as="geometry" />
|
| 21 |
-
</mxCell>
|
| 22 |
-
<mxCell id="7HGE-dyt3ShhVV6eNgTS-37" value="Fine-tuning Embeddings" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="7HGE-dyt3ShhVV6eNgTS-4">
|
| 23 |
-
<mxGeometry x="14" y="195" width="120" height="40" as="geometry" />
|
| 24 |
-
</mxCell>
|
| 25 |
-
<mxCell id="7HGE-dyt3ShhVV6eNgTS-33" value="Hyperparamter Tuning" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="7HGE-dyt3ShhVV6eNgTS-4">
|
| 26 |
-
<mxGeometry x="160" y="50" width="120" height="40" as="geometry" />
|
| 27 |
-
</mxCell>
|
| 28 |
-
<mxCell id="7HGE-dyt3ShhVV6eNgTS-56" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="7HGE-dyt3ShhVV6eNgTS-14" target="7HGE-dyt3ShhVV6eNgTS-19">
|
| 29 |
-
<mxGeometry relative="1" as="geometry" />
|
| 30 |
-
</mxCell>
|
| 31 |
-
<mxCell id="7HGE-dyt3ShhVV6eNgTS-14" value="<div>Data Preparation and Management</div>" style="swimlane;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
| 32 |
-
<mxGeometry x="40" y="40" width="360" height="240" as="geometry">
|
| 33 |
-
<mxRectangle x="410" y="40" width="240" height="30" as="alternateBounds" />
|
| 34 |
-
</mxGeometry>
|
| 35 |
-
</mxCell>
|
| 36 |
-
<mxCell id="7HGE-dyt3ShhVV6eNgTS-23" value="Chunking &amp; Vectorization" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="7HGE-dyt3ShhVV6eNgTS-14">
|
| 37 |
-
<mxGeometry x="14" y="50" width="120" height="40" as="geometry" />
|
| 38 |
-
</mxCell>
|
| 39 |
-
<mxCell id="7HGE-dyt3ShhVV6eNgTS-24" value="Metadata and Summaries" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;fillColor=#e1d5e7;strokeColor=#9673a6;" vertex="1" parent="7HGE-dyt3ShhVV6eNgTS-14">
|
| 40 |
-
<mxGeometry x="161" y="50" width="120" height="40" as="geometry" />
|
| 41 |
-
</mxCell>
|
| 42 |
-
<mxCell id="7HGE-dyt3ShhVV6eNgTS-25" value="User Profile Management" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;" vertex="1" parent="7HGE-dyt3ShhVV6eNgTS-14">
|
| 43 |
-
<mxGeometry x="14" y="190" width="120" height="40" as="geometry" />
|
| 44 |
-
</mxCell>
|
| 45 |
-
<mxCell id="7HGE-dyt3ShhVV6eNgTS-26" value="Data Cleaning" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="7HGE-dyt3ShhVV6eNgTS-14">
|
| 46 |
-
<mxGeometry x="14" y="120" width="120" height="40" as="geometry" />
|
| 47 |
-
</mxCell>
|
| 48 |
-
<mxCell id="7HGE-dyt3ShhVV6eNgTS-31" value="Complex Formats Handling" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="7HGE-dyt3ShhVV6eNgTS-14">
|
| 49 |
-
<mxGeometry x="161" y="120" width="120" height="40" as="geometry" />
|
| 50 |
-
</mxCell>
|
| 51 |
-
<mxCell id="7HGE-dyt3ShhVV6eNgTS-57" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="7HGE-dyt3ShhVV6eNgTS-19" target="7HGE-dyt3ShhVV6eNgTS-4">
|
| 52 |
-
<mxGeometry relative="1" as="geometry" />
|
| 53 |
-
</mxCell>
|
| 54 |
-
<mxCell id="7HGE-dyt3ShhVV6eNgTS-19" value="<div>User Input processing</div>" style="swimlane;horizontal=0;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
| 55 |
-
<mxGeometry x="40" y="360" width="200" height="280" as="geometry" />
|
| 56 |
-
</mxCell>
|
| 57 |
-
<mxCell id="WIyWlLk6GJQsqaUBKTNV-3" value="User Authentication" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;" parent="7HGE-dyt3ShhVV6eNgTS-19" vertex="1">
|
| 58 |
-
<mxGeometry x="40" y="20" width="120" height="40" as="geometry" />
|
| 59 |
-
</mxCell>
|
| 60 |
-
<mxCell id="WIyWlLk6GJQsqaUBKTNV-7" value="Query Rewriter" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;fillColor=#e1d5e7;strokeColor=#9673a6;" parent="7HGE-dyt3ShhVV6eNgTS-19" vertex="1">
|
| 61 |
-
<mxGeometry x="40" y="80" width="120" height="40" as="geometry" />
|
| 62 |
-
</mxCell>
|
| 63 |
-
<mxCell id="7HGE-dyt3ShhVV6eNgTS-8" value="Input Guardrail" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;fillColor=#f8cecc;strokeColor=#b85450;" vertex="1" parent="7HGE-dyt3ShhVV6eNgTS-19">
|
| 64 |
-
<mxGeometry x="40" y="140" width="120" height="40" as="geometry" />
|
| 65 |
-
</mxCell>
|
| 66 |
-
<mxCell id="7HGE-dyt3ShhVV6eNgTS-5" value="chat history&nbsp; " style="strokeWidth=2;html=1;shape=mxgraph.flowchart.multi-document;whiteSpace=wrap;fillColor=#ffe6cc;strokeColor=#d79b00;" vertex="1" parent="7HGE-dyt3ShhVV6eNgTS-19">
|
| 67 |
-
<mxGeometry x="56" y="210" width="88" height="60" as="geometry" />
|
| 68 |
-
</mxCell>
|
| 69 |
-
<mxCell id="7HGE-dyt3ShhVV6eNgTS-60" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0;exitDx=0;exitDy=0;entryX=1;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="7HGE-dyt3ShhVV6eNgTS-22" target="7HGE-dyt3ShhVV6eNgTS-44">
|
| 70 |
-
<mxGeometry relative="1" as="geometry">
|
| 71 |
-
<mxPoint x="790" y="280" as="targetPoint" />
|
| 72 |
-
</mxGeometry>
|
| 73 |
-
</mxCell>
|
| 74 |
-
<mxCell id="7HGE-dyt3ShhVV6eNgTS-22" value="Information Processing and Generation" style="swimlane;horizontal=0;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
| 75 |
-
<mxGeometry x="600" y="360" width="200" height="280" as="geometry" />
|
| 76 |
-
</mxCell>
|
| 77 |
-
<mxCell id="7HGE-dyt3ShhVV6eNgTS-9" value="Response Generation" style="rounded=1;whiteSpace=wrap;html=1;absoluteArcSize=1;arcSize=14;strokeWidth=2;fillColor=#e1d5e7;strokeColor=#9673a6;" vertex="1" parent="7HGE-dyt3ShhVV6eNgTS-22">
|
| 78 |
-
<mxGeometry x="40" y="20" width="120" height="40" as="geometry" />
|
| 79 |
-
</mxCell>
|
| 80 |
-
<mxCell id="7HGE-dyt3ShhVV6eNgTS-28" value="Output Guardrails and Moderation" style="rounded=1;whiteSpace=wrap;html=1;absoluteArcSize=1;arcSize=14;strokeWidth=2;fillColor=#f8cecc;strokeColor=#b85450;" vertex="1" parent="7HGE-dyt3ShhVV6eNgTS-22">
|
| 81 |
-
<mxGeometry x="40" y="80" width="120" height="40" as="geometry" />
|
| 82 |
-
</mxCell>
|
| 83 |
-
<mxCell id="7HGE-dyt3ShhVV6eNgTS-29" value="Caching" style="strokeWidth=2;html=1;shape=mxgraph.flowchart.multi-document;whiteSpace=wrap;fillColor=#ffe6cc;strokeColor=#d79b00;" vertex="1" parent="7HGE-dyt3ShhVV6eNgTS-22">
|
| 84 |
-
<mxGeometry x="56" y="140" width="88" height="60" as="geometry" />
|
| 85 |
-
</mxCell>
|
| 86 |
-
<mxCell id="7HGE-dyt3ShhVV6eNgTS-30" value="Personalization and Customization" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;" vertex="1" parent="7HGE-dyt3ShhVV6eNgTS-22">
|
| 87 |
-
<mxGeometry x="40" y="215" width="120" height="40" as="geometry" />
|
| 88 |
-
</mxCell>
|
| 89 |
-
<mxCell id="7HGE-dyt3ShhVV6eNgTS-61" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0;exitDx=0;exitDy=0;entryX=1;entryY=0;entryDx=0;entryDy=0;dashed=1;" edge="1" parent="WIyWlLk6GJQsqaUBKTNV-1" source="7HGE-dyt3ShhVV6eNgTS-44" target="7HGE-dyt3ShhVV6eNgTS-14">
|
| 90 |
-
<mxGeometry relative="1" as="geometry">
|
| 91 |
-
<Array as="points">
|
| 92 |
-
<mxPoint x="440" y="40" />
|
| 93 |
-
<mxPoint x="440" y="40" />
|
| 94 |
-
</Array>
|
| 95 |
-
</mxGeometry>
|
| 96 |
-
</mxCell>
|
| 97 |
-
<mxCell id="7HGE-dyt3ShhVV6eNgTS-44" value="Feedback and Continuous Improvement" style="swimlane;whiteSpace=wrap;html=1;startSize=23;" vertex="1" parent="WIyWlLk6GJQsqaUBKTNV-1">
|
| 98 |
-
<mxGeometry x="480" y="40" width="320" height="240" as="geometry" />
|
| 99 |
-
</mxCell>
|
| 100 |
-
<mxCell id="7HGE-dyt3ShhVV6eNgTS-46" value="Data Refinement" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;fillColor=#e1d5e7;strokeColor=#9673a6;" vertex="1" parent="7HGE-dyt3ShhVV6eNgTS-44">
|
| 101 |
-
<mxGeometry x="170" y="50" width="120" height="40" as="geometry" />
|
| 102 |
-
</mxCell>
|
| 103 |
-
<mxCell id="7HGE-dyt3ShhVV6eNgTS-47" value="System Monitoring" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="7HGE-dyt3ShhVV6eNgTS-44">
|
| 104 |
-
<mxGeometry x="170" y="120" width="120" height="40" as="geometry" />
|
| 105 |
-
</mxCell>
|
| 106 |
-
<mxCell id="7HGE-dyt3ShhVV6eNgTS-48" value="Generation Evaluation" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="7HGE-dyt3ShhVV6eNgTS-44">
|
| 107 |
-
<mxGeometry x="20" y="120" width="120" height="40" as="geometry" />
|
| 108 |
-
</mxCell>
|
| 109 |
-
<mxCell id="7HGE-dyt3ShhVV6eNgTS-49" value="User Feedback" style="rounded=1;whiteSpace=wrap;html=1;fontSize=12;glass=0;strokeWidth=1;shadow=0;" vertex="1" parent="7HGE-dyt3ShhVV6eNgTS-44">
|
| 110 |
-
<mxGeometry x="20" y="50" width="120" height="40" as="geometry" />
|
| 111 |
-
</mxCell>
|
| 112 |
-
</root>
|
| 113 |
-
</mxGraphModel>
|
| 114 |
-
</diagram>
|
| 115 |
-
</mxfile>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
docs/data_flow_diagram.drawio.png
DELETED
|
Binary file (53.1 kB)
|
|
|
mail_automation_draft.drawio
DELETED
|
@@ -1,140 +0,0 @@
|
|
| 1 |
-
<mxfile host="app.diagrams.net" modified="2024-05-21T13:40:30.482Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0" etag="dPw-sfjJEinoEt61k41I" version="24.4.4" type="github">
|
| 2 |
-
<diagram name="Page-1" id="JIRIjCkc2eHKuGLTyx-l">
|
| 3 |
-
<mxGraphModel dx="1434" dy="-1564" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
|
| 4 |
-
<root>
|
| 5 |
-
<mxCell id="0" />
|
| 6 |
-
<mxCell id="1" parent="0" />
|
| 7 |
-
<mxCell id="0ipz06AKfEBxF18oT8nj-1" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" parent="1" source="0ipz06AKfEBxF18oT8nj-19" target="0ipz06AKfEBxF18oT8nj-6" edge="1">
|
| 8 |
-
<mxGeometry relative="1" as="geometry" />
|
| 9 |
-
</mxCell>
|
| 10 |
-
<mxCell id="0ipz06AKfEBxF18oT8nj-2" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="0ipz06AKfEBxF18oT8nj-3" target="0ipz06AKfEBxF18oT8nj-31" edge="1">
|
| 11 |
-
<mxGeometry relative="1" as="geometry" />
|
| 12 |
-
</mxCell>
|
| 13 |
-
<mxCell id="0ipz06AKfEBxF18oT8nj-3" value="Ticket Creation" style="ellipse;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
| 14 |
-
<mxGeometry x="217.5" y="2640" width="120" height="80" as="geometry" />
|
| 15 |
-
</mxCell>
|
| 16 |
-
<mxCell id="0ipz06AKfEBxF18oT8nj-4" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="0ipz06AKfEBxF18oT8nj-6" target="0ipz06AKfEBxF18oT8nj-8" edge="1">
|
| 17 |
-
<mxGeometry relative="1" as="geometry" />
|
| 18 |
-
</mxCell>
|
| 19 |
-
<mxCell id="0ipz06AKfEBxF18oT8nj-5" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="0ipz06AKfEBxF18oT8nj-6" target="0ipz06AKfEBxF18oT8nj-21" edge="1">
|
| 20 |
-
<mxGeometry relative="1" as="geometry" />
|
| 21 |
-
</mxCell>
|
| 22 |
-
<mxCell id="0ipz06AKfEBxF18oT8nj-6" value="Fetch Emails" style="ellipse;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
| 23 |
-
<mxGeometry x="210.5" y="2480" width="120" height="80" as="geometry" />
|
| 24 |
-
</mxCell>
|
| 25 |
-
<mxCell id="0ipz06AKfEBxF18oT8nj-7" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="0ipz06AKfEBxF18oT8nj-8" target="0ipz06AKfEBxF18oT8nj-10" edge="1">
|
| 26 |
-
<mxGeometry relative="1" as="geometry" />
|
| 27 |
-
</mxCell>
|
| 28 |
-
<mxCell id="0ipz06AKfEBxF18oT8nj-8" value="Entity Recognition" style="ellipse;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
| 29 |
-
<mxGeometry x="410.5" y="2480" width="120" height="80" as="geometry" />
|
| 30 |
-
</mxCell>
|
| 31 |
-
<mxCell id="0ipz06AKfEBxF18oT8nj-9" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="0ipz06AKfEBxF18oT8nj-10" target="0ipz06AKfEBxF18oT8nj-14" edge="1">
|
| 32 |
-
<mxGeometry relative="1" as="geometry" />
|
| 33 |
-
</mxCell>
|
| 34 |
-
<mxCell id="0ipz06AKfEBxF18oT8nj-10" value="Classification &amp; Summarization" style="ellipse;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
| 35 |
-
<mxGeometry x="630" y="2480" width="120" height="80" as="geometry" />
|
| 36 |
-
</mxCell>
|
| 37 |
-
<mxCell id="0ipz06AKfEBxF18oT8nj-11" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" parent="1" source="0ipz06AKfEBxF18oT8nj-17" target="0ipz06AKfEBxF18oT8nj-15" edge="1">
|
| 38 |
-
<mxGeometry relative="1" as="geometry" />
|
| 39 |
-
</mxCell>
|
| 40 |
-
<mxCell id="0ipz06AKfEBxF18oT8nj-12" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="0ipz06AKfEBxF18oT8nj-14" target="0ipz06AKfEBxF18oT8nj-17" edge="1">
|
| 41 |
-
<mxGeometry relative="1" as="geometry" />
|
| 42 |
-
</mxCell>
|
| 43 |
-
<mxCell id="0ipz06AKfEBxF18oT8nj-13" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="0ipz06AKfEBxF18oT8nj-14" target="0ipz06AKfEBxF18oT8nj-24" edge="1">
|
| 44 |
-
<mxGeometry relative="1" as="geometry" />
|
| 45 |
-
</mxCell>
|
| 46 |
-
<mxCell id="0ipz06AKfEBxF18oT8nj-14" value="Data Enrichment" style="ellipse;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
| 47 |
-
<mxGeometry x="630" y="2640" width="120" height="80" as="geometry" />
|
| 48 |
-
</mxCell>
|
| 49 |
-
<mxCell id="0ipz06AKfEBxF18oT8nj-15" value="Draft Response" style="ellipse;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="1" vertex="1">
|
| 50 |
-
<mxGeometry x="410.5" y="2800" width="120" height="80" as="geometry" />
|
| 51 |
-
</mxCell>
|
| 52 |
-
<mxCell id="0ipz06AKfEBxF18oT8nj-16" value="" style="curved=1;endArrow=classic;html=1;rounded=0;exitX=0.75;exitY=1;exitDx=0;exitDy=0;entryX=0.25;entryY=1;entryDx=0;entryDy=0;" parent="1" source="0ipz06AKfEBxF18oT8nj-19" target="0ipz06AKfEBxF18oT8nj-19" edge="1">
|
| 53 |
-
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
| 54 |
-
<mxPoint x="200" y="2730" as="sourcePoint" />
|
| 55 |
-
<mxPoint x="80" y="2580" as="targetPoint" />
|
| 56 |
-
<Array as="points">
|
| 57 |
-
<mxPoint x="130" y="2600" />
|
| 58 |
-
<mxPoint x="90" y="2610" />
|
| 59 |
-
<mxPoint x="60" y="2620" />
|
| 60 |
-
<mxPoint x="53" y="2570" />
|
| 61 |
-
</Array>
|
| 62 |
-
</mxGeometry>
|
| 63 |
-
</mxCell>
|
| 64 |
-
<mxCell id="0ipz06AKfEBxF18oT8nj-17" value="Data Complete" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
| 65 |
-
<mxGeometry x="430.5" y="2640" width="80" height="80" as="geometry" />
|
| 66 |
-
</mxCell>
|
| 67 |
-
<mxCell id="0ipz06AKfEBxF18oT8nj-18" value="No" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" parent="1" vertex="1">
|
| 68 |
-
<mxGeometry x="460.5" y="2748" width="40" height="30" as="geometry" />
|
| 69 |
-
</mxCell>
|
| 70 |
-
<mxCell id="0ipz06AKfEBxF18oT8nj-19" value="Periodically Check Emails" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;" parent="1" vertex="1">
|
| 71 |
-
<mxGeometry x="30" y="2490" width="120" height="60" as="geometry" />
|
| 72 |
-
</mxCell>
|
| 73 |
-
<mxCell id="0ipz06AKfEBxF18oT8nj-20" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="0ipz06AKfEBxF18oT8nj-21" target="0ipz06AKfEBxF18oT8nj-22" edge="1">
|
| 74 |
-
<mxGeometry relative="1" as="geometry" />
|
| 75 |
-
</mxCell>
|
| 76 |
-
<mxCell id="0ipz06AKfEBxF18oT8nj-21" value="Download Attachements" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
| 77 |
-
<mxGeometry x="210.5" y="2360" width="120" height="60" as="geometry" />
|
| 78 |
-
</mxCell>
|
| 79 |
-
<mxCell id="0ipz06AKfEBxF18oT8nj-22" value="Extract Text and Images from PDF" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
| 80 |
-
<mxGeometry x="399.5" y="2360" width="120" height="60" as="geometry" />
|
| 81 |
-
</mxCell>
|
| 82 |
-
<mxCell id="0ipz06AKfEBxF18oT8nj-23" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.596;exitY=1.033;exitDx=0;exitDy=0;exitPerimeter=0;" parent="1" source="0ipz06AKfEBxF18oT8nj-22" target="0ipz06AKfEBxF18oT8nj-8" edge="1">
|
| 83 |
-
<mxGeometry relative="1" as="geometry">
|
| 84 |
-
<mxPoint x="281" y="2490" as="sourcePoint" />
|
| 85 |
-
<mxPoint x="281" y="2430" as="targetPoint" />
|
| 86 |
-
</mxGeometry>
|
| 87 |
-
</mxCell>
|
| 88 |
-
<mxCell id="0ipz06AKfEBxF18oT8nj-24" value="CRM, SQL, Product KB" style="ellipse;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
| 89 |
-
<mxGeometry x="650" y="2800" width="80" height="80" as="geometry" />
|
| 90 |
-
</mxCell>
|
| 91 |
-
<mxCell id="0ipz06AKfEBxF18oT8nj-25" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="0ipz06AKfEBxF18oT8nj-17" target="0ipz06AKfEBxF18oT8nj-3" edge="1">
|
| 92 |
-
<mxGeometry relative="1" as="geometry">
|
| 93 |
-
<mxPoint x="620.5" y="2690" as="sourcePoint" />
|
| 94 |
-
<mxPoint x="520.5" y="2690" as="targetPoint" />
|
| 95 |
-
</mxGeometry>
|
| 96 |
-
</mxCell>
|
| 97 |
-
<mxCell id="0ipz06AKfEBxF18oT8nj-26" value="Yes" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="0ipz06AKfEBxF18oT8nj-25" vertex="1" connectable="0">
|
| 98 |
-
<mxGeometry x="-0.1183" y="-5" relative="1" as="geometry">
|
| 99 |
-
<mxPoint as="offset" />
|
| 100 |
-
</mxGeometry>
|
| 101 |
-
</mxCell>
|
| 102 |
-
<mxCell id="0ipz06AKfEBxF18oT8nj-27" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=1;entryY=0;entryDx=0;entryDy=0;" parent="1" source="0ipz06AKfEBxF18oT8nj-15" target="0ipz06AKfEBxF18oT8nj-8" edge="1">
|
| 103 |
-
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
| 104 |
-
<mxPoint x="520" y="2980" as="sourcePoint" />
|
| 105 |
-
<mxPoint x="570" y="2930" as="targetPoint" />
|
| 106 |
-
<Array as="points">
|
| 107 |
-
<mxPoint x="470" y="2930" />
|
| 108 |
-
<mxPoint x="770" y="2930" />
|
| 109 |
-
<mxPoint x="770" y="2690" />
|
| 110 |
-
<mxPoint x="770" y="2450" />
|
| 111 |
-
<mxPoint x="513" y="2450" />
|
| 112 |
-
</Array>
|
| 113 |
-
</mxGeometry>
|
| 114 |
-
</mxCell>
|
| 115 |
-
<mxCell id="0ipz06AKfEBxF18oT8nj-28" value="Mail / WhatsApp /..." style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="0ipz06AKfEBxF18oT8nj-27" vertex="1" connectable="0">
|
| 116 |
-
<mxGeometry x="-0.6717" y="3" relative="1" as="geometry">
|
| 117 |
-
<mxPoint as="offset" />
|
| 118 |
-
</mxGeometry>
|
| 119 |
-
</mxCell>
|
| 120 |
-
<mxCell id="0ipz06AKfEBxF18oT8nj-29" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" source="0ipz06AKfEBxF18oT8nj-31" target="0ipz06AKfEBxF18oT8nj-32" edge="1">
|
| 121 |
-
<mxGeometry relative="1" as="geometry" />
|
| 122 |
-
</mxCell>
|
| 123 |
-
<mxCell id="0ipz06AKfEBxF18oT8nj-30" value="slack / discord / teams" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="0ipz06AKfEBxF18oT8nj-29" vertex="1" connectable="0">
|
| 124 |
-
<mxGeometry x="-0.3" y="2" relative="1" as="geometry">
|
| 125 |
-
<mxPoint as="offset" />
|
| 126 |
-
</mxGeometry>
|
| 127 |
-
</mxCell>
|
| 128 |
-
<mxCell id="0ipz06AKfEBxF18oT8nj-31" value="Fetch Relevant historical data &amp; BP" style="whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
| 129 |
-
<mxGeometry x="217.5" y="2810" width="120" height="60" as="geometry" />
|
| 130 |
-
</mxCell>
|
| 131 |
-
<mxCell id="0ipz06AKfEBxF18oT8nj-32" value="Recommendations to Agent" style="whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="1" vertex="1">
|
| 132 |
-
<mxGeometry x="217.5" y="2950" width="120" height="60" as="geometry" />
|
| 133 |
-
</mxCell>
|
| 134 |
-
<mxCell id="1TZoFbZY8AwqjJc08LRQ-1" value="email, customer name, contract id, date, category, summary, issue category,T&amp;C, Process descriptions, customer history, issue summary" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
| 135 |
-
<mxGeometry x="265" y="3028" width="770" height="30" as="geometry" />
|
| 136 |
-
</mxCell>
|
| 137 |
-
</root>
|
| 138 |
-
</mxGraphModel>
|
| 139 |
-
</diagram>
|
| 140 |
-
</mxfile>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requirements.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
langchain
|
| 2 |
langchain-community
|
| 3 |
-
|
| 4 |
beautifulsoup4
|
| 5 |
faiss-cpu
|
| 6 |
chromadb
|
|
|
|
| 1 |
langchain
|
| 2 |
langchain-community
|
| 3 |
+
langchain-huggingface
|
| 4 |
beautifulsoup4
|
| 5 |
faiss-cpu
|
| 6 |
chromadb
|