{ "cells": [ { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [], "source": [ "# !pip install nest_asyncio \\\n", "# langchain_openai langchain_huggingface langchain_core langchain langchain_community langchain-text-splitters \\\n", "# python-pptx==1.0.2 nltk==3.9.1 pymupdf lxml \\\n", "# sentence-transformers IProgress \\\n", "# huggingface_hub ipywidgets \\\n", "# qdrant-client langchain_experimental\n", "\n", "# !pip install sentence_transformers datasets pyarrow\n", "# !pip install torch\n", "# !pip install accelerate>=0.26.0\n", "# !pip install transformers\n", "# !pip install wandb\n", "# !pip install ragas\n", "\n" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "\n", "import nest_asyncio\n", "\n", "nest_asyncio.apply()" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "import os\n", "import getpass\n", "\n", "os.environ[\"OPENAI_API_KEY\"] = getpass.getpass(\"Enter Your OpenAI API Key: \")\n", "os.environ[\"RAGAS_APP_TOKEN\"] = getpass.getpass(\"Please enter your Ragas API key!\")" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "hf_username = getpass.getpass(\"Enter Your Hugging Face Username: \")\n" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "7171fa2fd73446349406e23d4f6b898f", "version_major": 2, "version_minor": 0 }, "text/plain": [ "VBox(children=(HTML(value='
\n", " | user_input | \n", "reference_contexts | \n", "reference | \n", "synthesizer_name | \n", "
---|---|---|---|---|
0 | \n", "What does the Decision-Making Confidence Scale... | \n", "[Linked Psychological & Physical Assessment\\nP... | \n", "The Decision-Making Confidence Scale (DMCS-6) ... | \n", "single_hop_specifc_query_synthesizer | \n", "
1 | \n", "Wht is the Work-Related Stress Scale and how d... | \n", "[Linked Psychological & Physical Assessment\\nP... | \n", "The Work-Related Stress Scale (WRSS-8) evaluat... | \n", "single_hop_specifc_query_synthesizer | \n", "
2 | \n", "what cognitive load management scale do, how i... | \n", "[Financial Stress Index (FSI-6)\\nThe FSI-6 eva... | \n", "The Cognitive Load Management Scale (CLMS-7) m... | \n", "single_hop_specifc_query_synthesizer | \n", "
3 | \n", "What is the purpose of the Emotional Regulatio... | \n", "[Financial Stress Index (FSI-6)\\nThe FSI-6 eva... | \n", "The context does not provide specific informat... | \n", "single_hop_specifc_query_synthesizer | \n", "
4 | \n", "What does the MRI-6 assess? | \n", "[The ERI-9 assesses an individual's ability to... | \n", "The MRI-6 evaluates short-term and long-term m... | \n", "single_hop_specifc_query_synthesizer | \n", "
5 | \n", "What does the Social Confidence Measure (SCM-6... | \n", "[The ERI-9 assesses an individual's ability to... | \n", "The Social Confidence Measure (SCM-6) evaluate... | \n", "single_hop_specifc_query_synthesizer | \n", "
6 | \n", "What OFI-7 do? | \n", "[Linked Psychological & Physical Assessment\\nC... | \n", "The OFI-7 assesses work-related exhaustion and... | \n", "single_hop_specifc_query_synthesizer | \n", "
7 | \n", "Cud yu pleese explane wut the Chronic Pain Adj... | \n", "[Linked Psychological & Physical Assessment\\nC... | \n", "The Chronic Pain Adjustment Index (CPAI-10) ev... | \n", "single_hop_specifc_query_synthesizer | \n", "
8 | \n", "What CWT-7 do? | \n", "[I feel confident when making important decisi... | \n", "The CWT-7 evaluates an individual's ability to... | \n", "single_hop_specifc_query_synthesizer | \n", "
9 | \n", "Cud yu pleese explane how the COGNITIVE Worklo... | \n", "[I feel confident when making important decisi... | \n", "The Cognitive Workload Tolerance (CWT-7) evalu... | \n", "single_hop_specifc_query_synthesizer | \n", "