{"id":80097,"date":"2025-02-10T15:41:46","date_gmt":"2025-02-10T15:41:46","guid":{"rendered":"https:\/\/peraltafinancing.com\/analytics\/building-a-bhagavad-gita-ai-assistant\/"},"modified":"2025-02-10T15:41:46","modified_gmt":"2025-02-10T15:41:46","slug":"building-a-bhagavad-gita-ai-assistant","status":"publish","type":"post","link":"https:\/\/fivemor.com\/?p=80097","title":{"rendered":"Building a Bhagavad Gita AI Assistant"},"content":{"rendered":"<p> <br \/>\n<\/p>\n<div id=\"article-start\">\n<p>In the fast-evolving world of AI,<a href=\"https:\/\/www.analyticsvidhya.com\/blog\/2023\/03\/an-introduction-to-large-language-models-llms\/\" target=\"_blank\" rel=\"noreferrer noopener\"> large language models<\/a> are pushing boundaries in speed, accuracy, and cost-efficiency. The recent release of Deepseek R1, an open-source model rivaling OpenAI\u2019s o1, is a hot topic in the AI space, especially given its 27x lower cost and superior reasoning capabilities. Pair this with Qdrant\u2019s binary quantization for efficient and quick vector searches, we can index over 1,000+ page documents. In this article, we\u2019ll create a Bhagavad Gita AI Assistant, capable of indexing 1,000+ pages, answering complex queries in seconds using Groq, and delivering insights with domain-specific precision.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-learning-objectives\">Learning Objectives<\/h3>\n<ul class=\"wp-block-list\">\n<li>Implement binary quantization in Qdrant for memory-efficient vector indexing.<\/li>\n<li>Understand how to build a Bhagavad Gita AI Assistant using Deepseek R1, Qdrant, and LlamaIndex for efficient text retrieval.<\/li>\n<li>Learn to optimize Bhagavad Gita AI Assistant with Groq for fast, domain-specific query responses and large-scale document indexing.<\/li>\n<li>Build a RAG pipeline using LlamaIndex and FastEmbed local embeddings to process 1,000+ pages of the Bhagavad Gita.<\/li>\n<li>Integrate Deepseek R1 from Groq\u2019s inferencing for real-time, low-latency responses.<\/li>\n<li>Develop a\u00a0Streamlit UI\u00a0to showcase AI-powered insights with thinking transparency.<\/li>\n<\/ul>\n<p><em><strong>This article was published as a part of the\u00a0<\/strong><\/em><a href=\"https:\/\/www.analyticsvidhya.com\/datahack\/blogathon\" target=\"_blank\" rel=\"noreferrer noopener\"><em><strong>Data Science Blogathon.<\/strong><\/em><\/a><\/p>\n<h2 class=\"wp-block-heading\" id=\"h-deepseek-r1-vs-openai-o1\">Deepseek R1 vs OpenAI o1<\/h2>\n<p>Deepseek R1 challenges OpenAI\u2019s dominance with\u00a027x lower API costs\u00a0and near-par performance on reasoning benchmarks. Unlike OpenAI\u2019s o1 closed, subscription-based model ($200\/month), Deepseek R1 is\u00a0free, open-source, and ideal for budget-conscious projects and experimentation.\u00a0<\/p>\n<p>Reasoning- ARC-AGI Benchmark: [Source: <a href=\"https:\/\/x.com\/arcprize\/status\/1881761987090325517\" target=\"_blank\" rel=\"nofollow noopener\">ARC-AGI Deepseek<\/a>]\u00a0<\/p>\n<ul class=\"wp-block-list\">\n<li>Deepseek: 20.5% accuracy (public), 15.8% (semi-private).<\/li>\n<li>OpenAI: 21% accuracy (public), 18% (semi-private).<\/li>\n<\/ul>\n<p>From my experience so far, Deepseek does a great job with math reasoning, coding-related use cases, and context-aware prompts.\u00a0However, OpenAI retains an edge in\u00a0general knowledge breadth, making it preferable for fact-diverse applications.<\/p>\n<h2 class=\"wp-block-heading\" id=\"h-what-is-binary-quantization-in-vector-databases\">What is Binary Quantization in Vector Databases?<\/h2>\n<p>Binary quantization (BQ) is Qdrant\u2019s indexing compression technique to optimize high-dimensional vector storage and retrieval. By converting 32-bit floating-point vectors into\u00a01-bit binary values, it slashes memory usage by\u00a040x\u00a0and accelerates search speeds dramatically.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-how-it-works\">How It Works<\/h3>\n<ul class=\"wp-block-list\">\n<li>Binarization: Vectors are simplified to 0s and 1s based on a threshold (e.g., values &gt;0 become 1).<\/li>\n<li>Efficient Indexing: Qdrant\u2019s HNSW algorithm uses these binary vectors for rapid approximate nearest neighbor (ANN) searches.<\/li>\n<li>Oversampling: To balance speed and accuracy, BQ retrieves extra candidates (e.g., 200 for a limit of 100) and re-ranks them using original vectors.<\/li>\n<\/ul>\n<h3 class=\"wp-block-heading\" id=\"h-why-it-matters\">Why It Matters<\/h3>\n<ul class=\"wp-block-list\">\n<li>Storage: A 1536-dimension OpenAI vector shrinks from 6KB to 0.1875 KB.<\/li>\n<li>Speed: Boolean operations on 1-bit vectors execute faster, reducing latency.<\/li>\n<li>Scalability: Ideal for large datasets (1M+ vectors) with minimal recall tradeoffs.<\/li>\n<\/ul>\n<p>Avoid binary quantization for\u00a0low-dimension vectors (<\/p>\n<h2 class=\"wp-block-heading\" id=\"h-building-the-bhagavad-gita-assistant\">Building the Bhagavad Gita Assistant<\/h2>\n<p>Below is the flow chart that explains on how we can build Bhagwad Gita Assistant:<\/p>\n<figure class=\"wp-block-image size-full figure  mt-2 mb-2 d-table mx-auto\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1519\" height=\"292\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/02\/Building-the-Bhagavad-Gita-Assistant.webp\" alt=\"Building the Bhagavad Gita Assistant\" class=\"wp-image-220647\" srcset=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/02\/Building-the-Bhagavad-Gita-Assistant.webp 1519w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/02\/Building-the-Bhagavad-Gita-Assistant-300x58.webp 300w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/02\/Building-the-Bhagavad-Gita-Assistant-768x148.webp 768w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/02\/Building-the-Bhagavad-Gita-Assistant-150x29.webp 150w\" sizes=\"(max-width: 1519px) 100vw, 1519px\"\/><\/figure>\n<p><b>Architecture Overview<\/b><\/p>\n<ul class=\"wp-block-list\">\n<li>Data Ingestion: 900-page Bhagavad Gita PDF split into text chunks.<\/li>\n<li>Embedding: Qdrant FastEmbed\u2019s text-to-vector embedding model.<\/li>\n<li>Vector DB: Qdrant with BQ stores embeddings, enabling millisecond searches.<\/li>\n<li>LLM Inference: Deepseek R1 via Groq LPUs generates context-aware responses.<\/li>\n<li>UI: Streamlit app with expandable \u201cthinking process\u201d visibility.<\/li>\n<\/ul>\n<h2 class=\"wp-block-heading\" id=\"h-step-by-step-implementation\">Step-by-Step Implementation<\/h2>\n<p>Let us now follow the steps on by one:<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-step1-installation-and-initial-setup\">Step1: Installation and Initial Setup<\/h3>\n<p>Let\u2019s set up the foundation of our RAG pipeline using LlamaIndex. We need to install essential packages including the core LlamaIndex library, Qdrant vector store integration, FastEmbed for embeddings, and Groq for LLM access.<\/p>\n<p><b>Note:<\/b><\/p>\n<ul class=\"wp-block-list\">\n<li>For document indexing, we will use a <b>GPU<\/b> from Colab to store the data. This is a one-time process.<\/li>\n<li>Once the data is saved, we can use the collection name to run inferences anywhere, whether on VS Code, Streamlit, or other platforms.<\/li>\n<\/ul>\n<pre class=\"wp-block-code\"><code>!pip install llama-index\n!pip install llama-index-vector-stores-qdrant llama-index-embeddings-fastembed\n!pip install llama-index-readers-file\n!pip install llama-index-llms-groq  <\/code><\/pre>\n<p>Once the installation is done, let\u2019s import the required modules.\u00a0<\/p>\n<pre class=\"wp-block-code\"><code>import logging\nimport sys\nimport os\n\nimport qdrant_client\nfrom qdrant_client import models\n\nfrom llama_index.core import SimpleDirectoryReader\nfrom llama_index.embeddings.fastembed import FastEmbedEmbedding\nfrom llama_index.llms.groq import Groq # deep seek r1 implementation<\/code><\/pre>\n<h3 class=\"wp-block-heading\" id=\"h-step2-document-processing-and-embedding\">Step2: Document Processing and Embedding\u00a0<\/h3>\n<p>Here, we handle the crucial task of converting raw text into vector representations. The SimpleDirectoryReader loads documents from a specified folder.<\/p>\n<p>Create a folder, i.e., a data directory, and add all your documents inside it. In our case, we downloaded the Bhagavad Gita document and saved it in the data folder.<\/p>\n<p>You can download the ~900-page Bhagavad Gita document here: <a href=\"https:\/\/iskconmangaluru.com\/wp-content\/uploads\/2021\/04\/English-Bhagavad-gita-His-Divine-Grace-AC-Bhaktivedanta-Swami-Prabhupada.pdf\" target=\"_blank\" rel=\"nofollow noopener\">iskconmangaluru<\/a><\/p>\n<pre class=\"wp-block-code\"><code>data = SimpleDirectoryReader(\"data\").load_data()\ntexts = [doc.text for doc in data]\n\nembeddings = []\nBATCH_SIZE = 50<\/code><\/pre>\n<p>Qdrant\u2019s FastEmbed is a lightweight, fast Python library designed for efficient embedding generation. It supports popular text models and utilizes quantized model weights along with the ONNX Runtime for inference, ensuring high performance without heavy dependencies.<\/p>\n<p>To convert the text chunks into embeddings, we will use Qdrant\u2019s FastEmbed. We process these in batches of 50 documents to manage memory efficiently.\u00a0<\/p>\n<pre class=\"wp-block-code\"><code>embed_model = FastEmbedEmbedding(model_name=\"thenlper\/gte-large\")\n\n\nfor page in range(0, len(texts), BATCH_SIZE):\n    page_content = texts[page:page + BATCH_SIZE]\n    response = embed_model.get_text_embedding_batch(page_content)\n    embeddings.extend(response)<\/code><\/pre>\n<h3 class=\"wp-block-heading\" id=\"h-step3-qdrant-setup-with-binary-quantization\">Step3: Qdrant Setup with Binary Quantization<\/h3>\n<p>Time to configure Qdrant client, our vector database, with optimized settings for performance. We create a collection named \u201cbhagavad-gita\u201d with specific vector parameters and enable binary quantization for efficient storage and retrieval.<\/p>\n<p>There are three ways to use the Qdrant client:\u00a0<\/p>\n<ul class=\"wp-block-list\">\n<li>In-Memory Mode: Using location=\u201d:memory:\u201d, which creates a temporary instance that runs only once.\u00a0<\/li>\n<li>Localhost: Using location=\u201dlocalhost\u201d, which requires running a Docker instance. You can follow the setup guide here: <a href=\"https:\/\/qdrant.tech\/documentation\/quickstart\/\" rel=\"nofollow\">Qdrant Quickstart<\/a>.\u00a0<\/li>\n<li>Cloud Storage: Storing collections in the <a href=\"https:\/\/cloud.qdrant.io\/\" rel=\"nofollow\">cloud<\/a>. To do this, create a new cluster, provide a cluster name, and generate an API key. Copy the key and retrieve the URL from the curl command.<\/li>\n<\/ul>\n<p>Note the collection name needs to be unique, after every data change this needs to be changed as well.\u00a0<\/p>\n<pre class=\"wp-block-code\"><code>collection_name = \"bhagavad-gita\"\n\nclient = qdrant_client.QdrantClient(\n    #location=\":memory:\",\n    url = \"QDRANT_URL\", # replace QDRANT_URL with your endpoint\n    api_key = \"QDRANT_API_KEY\", # replace QDRANT_API_KEY with your API keys\n    prefer_grpc=True\n)\n<\/code><\/pre>\n<p>We first check if a collection with the specified collection_name exists in Qdrant. If it doesn\u2019t, only then we create a new collection configured to store 1,024-dimensional vectors and use cosine similarity for distance measurement.<\/p>\n<p>We enable on-disk storage for the original vectors and apply binary quantization, which compresses the vectors to reduce memory usage and enhance search speed. The always_ram parameter ensures that the quantized vectors are kept in RAM for faster access.<\/p>\n<pre class=\"wp-block-code\"><code>if not client.collection_exists(collection_name=collection_name):\n    client.create_collection(\n        collection_name=collection_name,\n        vectors_config=models.VectorParams(size=1024,\n                                           distance=models.Distance.COSINE,\n                                           on_disk=True),\n        quantization_config=models.BinaryQuantization(\n            binary=models.BinaryQuantizationConfig(\n                always_ram=True,\n            ),\n        ),\n    )\nelse:\n    print(\"Collection already exists\")<\/code><\/pre>\n<h3 class=\"wp-block-heading\" id=\"h-step4-index-the-document\">Step4: Index the document<\/h3>\n<p>The indexing process uploads our processed documents and their embeddings to Qdrant in batches. Each document is stored alongside its vector representation, creating a searchable knowledge base.<\/p>\n<p>The GPU will be used at this stage, and depending on the data size, this step may take a few minutes.<\/p>\n<pre class=\"wp-block-code\"><code>for idx in range(0, len(texts), BATCH_SIZE):\n    docs = texts[idx:idx + BATCH_SIZE]\n    embeds = embeddings[idx:idx + BATCH_SIZE]\n\n    client.upload_collection(collection_name=collection_name,\n                                vectors=embeds,\n                                payload=[{\"context\": context} for context in docs])\n\nclient.update_collection(collection_name= collection_name,\n                        optimizer_config=models.OptimizersConfigDiff(indexing_threshold=20000)) <\/code><\/pre>\n<h3 class=\"wp-block-heading\" id=\"h-step5-rag-pipeline-with-deepseek-r1\">Step5: RAG Pipeline with Deepseek R1<\/h3>\n<h4 class=\"wp-block-heading\" id=\"h-process-1-r-retrieve-relevant-document\">Process-1: R- Retrieve relevant document<\/h4>\n<p>The search function takes a user query, converts it to an embedding, and retrieves the most relevant documents from Qdrant based on cosine similarity. We demonstrate this with a sample query about the Bhagavad-g\u012bt\u0101, showing how to access and print the retrieved context.<\/p>\n<pre class=\"wp-block-code\"><code>def search(query,k=5):\n  # query = user prompt\n  query_embedding = embed_model.get_query_embedding(query)\n  result = client.query_points(\n            collection_name = collection_name,\n            query=query_embedding,\n            limit = k\n        )\n  return result\n  \nrelevant_docs = search(\"In Bhagavad-g\u012bt\u0101 who is the person devoted to?\")\n\nprint(relevant_docs.points[4].payload['context'])<\/code><\/pre>\n<h4 class=\"wp-block-heading\" id=\"h-process-2-a-augmenting-prompt\">Process-2: A- Augmenting prompt<\/h4>\n<p>For RAG it\u2019s important to define the system\u2019s interaction template using ChatPromptTemplate. The template creates a specialized assistant knowledgeable in Bhagavad-gita, capable of understanding multiple languages (English, Hindi, Sanskrit).<\/p>\n<p>It includes structured formatting for context injection and query handling, with clear instructions for handling out-of-context questions.<\/p>\n<pre class=\"wp-block-code\"><code>from llama_index.core import ChatPromptTemplate\nfrom llama_index.core.llms import ChatMessage, MessageRole\n\nmessage_templates = [\n    ChatMessage(\n        content=\"\"\"\n        You are an expert ancient assistant who is well versed in Bhagavad-gita.\n        You are Multilingual, you understand English, Hindi and Sanskrit.\n        \n        Always structure your response in this format:\n        <think>\n        [Your step-by-step thinking process here]\n        <\/think>\n        \n        [Your final answer here]\n        \"\"\",\n        role=MessageRole.SYSTEM),\n    ChatMessage(\n        content=\"\"\"\n        We have provided context information below.\n        {context_str}\n        ---------------------\n        Given this information, please answer the question: {query}\n        ---------------------\n        If the question is not from the provided context, say `I don't know. Not enough information received.`\n        \"\"\",\n        role=MessageRole.USER,\n    ),\n]<\/code><\/pre>\n<h4 class=\"wp-block-heading\" id=\"h-process-3-g-generating-the-response\">Process-3: G- Generating the response<\/h4>\n<p>The final pipeline brings everything together in a cohesive RAG system. It follows the Retrieve-Augment-Generate pattern: retrieving relevant documents, augmenting them with our specialized prompt template, and generating responses using the LLM. Here for LLM we will use Deepseek R-1 distill Llama 70 B hosted on Groq, get your keys from here:\u00a0<a href=\"https:\/\/console.groq.com\/\" target=\"_blank\" rel=\"nofollow noopener\">Groq Console<\/a>.<\/p>\n<pre class=\"wp-block-code\"><code>os.environ['GROQ_API_KEY'] = \"GROQ_API_KEY\" # replace with your keys\nllm = Groq(model=\"deepseek-r1-distill-llama-70b\")\n\n\ndef pipeline(query):\n    # R - Retriver\n    relevant_documents = search(query)\n    context = [doc.payload['context'] for doc in relevant_documents.points]\n    context = \"\\n\".join(context)\n\n    # A - Augment\n    chat_template = ChatPromptTemplate(message_templates=message_templates)\n\n    # G - Generate\n    response = llm.complete(\n        chat_template.format(\n            context_str=context,\n            query=query)\n    )\n    return response\n    \n    \nprint(pipeline(\"\"\"what is the PURPORT of O my teacher, behold the great\tarmy of\t the sons of P\u0101\u1e47\u1e0du, so\nexpertly arranged by your intelligent disciple, the son of Drupada.\"\"\"))<\/code><\/pre>\n<h4 class=\"wp-block-heading\" id=\"h-output-syntax-lt-think-reasoning-lt-think-response\">Output: (Syntax: <think> reasoning <\/think> response)<\/h4>\n<figure class=\"wp-block-image size-full is-resized figure mt-2 mb-2 d-table mx-auto\"><img loading=\"lazy\" decoding=\"async\" width=\"919\" height=\"652\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/02\/outputtt.webp\" alt=\"output\" class=\"wp-image-220648\" style=\"width:726px;height:auto\" srcset=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/02\/outputtt.webp 919w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/02\/outputtt-300x213.webp 300w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/02\/outputtt-768x545.webp 768w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/02\/outputtt-150x106.webp 150w\" sizes=\"auto, (max-width: 919px) 100vw, 919px\"\/><\/figure>\n<pre class=\"wp-block-code\"><code>print(pipeline(\"\"\"\nJayas\ttu\tp\u0101\u1e47\u1e0du-putr\u0101\u1e47\u0101\u1e41\tye\u1e63\u0101\u1e41\tpak\u1e63e\tjan\u0101rdana\u1e25.\nexplain this gita from translation\n\"\"\"))<\/code><\/pre>\n<figure class=\"wp-block-image size-full is-resized figure mt-2 mb-2 d-table mx-auto\"><img loading=\"lazy\" decoding=\"async\" width=\"916\" height=\"678\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/02\/Screenshot_2025-02-08_at_15.23.10.webp\" alt=\"output\" class=\"wp-image-220649\" style=\"width:683px;height:auto\" srcset=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/02\/Screenshot_2025-02-08_at_15.23.10.webp 916w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/02\/Screenshot_2025-02-08_at_15.23.10-300x222.webp 300w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/02\/Screenshot_2025-02-08_at_15.23.10-768x568.webp 768w, https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2025\/02\/Screenshot_2025-02-08_at_15.23.10-150x111.webp 150w\" sizes=\"auto, (max-width: 916px) 100vw, 916px\"\/><\/figure>\n<p>Now what if you need to use this application again? Are we supposed to undergo all the steps again?<\/p>\n<p>The answer is no.\u00a0<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-step6-saved-index-inference\">Step6: Saved Index Inference\u00a0<\/h3>\n<p>There is not much difference in what you have already written. We will reuse the same search and pipeline function along with the collection name that we need to run the query_points.\u00a0<\/p>\n<pre class=\"wp-block-code\"><code>client = qdrant_client.QdrantClient(\n        url= \"QDRANT_URL\",\n        api_key = \"QDRANT_API_KEY\",\n        prefer_grpc = True\n    )\n    \n\n# the search and pipeline code remain the same. \n\ndef search(query, client, embed_model, k=5):\n    collection_name = \"bhagavad-gita\"\n    query_embedding = embed_model.get_query_embedding(query)\n    result = client.query_points(\n        collection_name=collection_name,\n        query=query_embedding,\n        limit=k\n    )\n    return result\n\ndef pipeline(query, embed_model, llm, client):\n    # R - Retriever\n    relevant_documents = search(query, client, embed_model)\n    context = [doc.payload['context'] for doc in relevant_documents.points]\n    context = \"\\n\".join(context)\n\n    # A - Augment\n    chat_template = ChatPromptTemplate(message_templates=message_templates)\n\n    # G - Generate\n    response = llm.complete(\n        chat_template.format(\n            context_str=context,\n            query=query)\n    )\n    return response<\/code><\/pre>\n<p>We will use the same above two functions and message_template in the Streamlit app.py.\u00a0<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-step7-streamlit-ui\">Step7: Streamlit UI<\/h3>\n<p>In Streamlit after every user question, the state is refreshed. To avoid refreshing the entire page again, we will define a few initialization steps under Streamlit cache_resource.\u00a0<\/p>\n<p>Remember when the user enters the question, the FastEmbed will download the model weights just once, the same goes for Groq and Qdrant instantiation.\u00a0<\/p>\n<pre class=\"wp-block-code\"><code>import streamlit as st\nfrom time import sleep\nimport qdrant_client\nfrom qdrant_client import models\nfrom llama_index.core import ChatPromptTemplate\nfrom llama_index.core.llms import ChatMessage, MessageRole\nfrom llama_index.embeddings.fastembed import FastEmbedEmbedding\nfrom llama_index.llms.groq import Groq\nfrom dotenv import load_dotenv\nimport os\n\nload_dotenv()\n\n@st.cache_resource\ndef initialize_models():\n    embed_model = FastEmbedEmbedding(model_name=\"thenlper\/gte-large\")\n    llm = Groq(model=\"deepseek-r1-distill-llama-70b\")\n    client = qdrant_client.QdrantClient(\n        url=os.getenv(\"QDRANT_URL\"),\n        api_key=os.getenv(\"QDRANT_API_KEY\"),\n        prefer_grpc=True\n    )\n    return embed_model, llm, client\n    \nst.title(\"\ud83d\udd49\ufe0f Bhagavad Gita Assistant\")\n# this will run only once, and be saved inside the cache\nembed_model, llm, client = initialize_models() <\/code><\/pre>\n<p>If you noticed the response output, the format is <think> reasoning <\/think> response.\u00a0<\/p>\n<p>On the UI, I want to keep the reasoning under the Streamlit expander, to retrieve the reasoning part, let\u2019s use string indexing to extract the reasoning and the actual response.\u00a0<\/p>\n<pre class=\"wp-block-code\"><code>def extract_thinking_and_answer(response_text):\n    \"\"\"Extract thinking process and final answer from response\"\"\"\n    try:\n        thinking = response_text[response_text.find(\"<think>\") + 7:response_text.find(\"<\/think>\")].strip()\n        answer = response_text[response_text.find(\"\") + 8:].strip()\n        return thinking, answer\n    except:\n        return \"\", response_text<\/code><\/pre>\n<h4 class=\"wp-block-heading\" id=\"h-chatbot-component\">Chatbot Component<\/h4>\n<p>Initializes a messages history in Streamlit\u2019s session state. A \u201cClear Chat\u201d button in the sidebar allows users to reset this history.\u00a0<\/p>\n<p>Iterates through stored messages and displays them in a chat-like interface. For assistant responses, it separates the thinking process (shown in an expandable section) from the actual answer using the extract_thinking_and_answer function.<\/p>\n<p>The remaining piece of code is a standard format to define the chatbot component in Streamlit i.e., input handling that creates an input field for user questions. When a question is submitted, it\u2019s displayed and added to the message history. Now it processes the user\u2019s question through the RAG pipeline while showing a loading spinner. The response is split into thinking process and answer components.<\/p>\n<pre class=\"wp-block-code\"><code>def main():\n    if \"messages\" not in st.session_state:\n        st.session_state.messages = []\n\n    with st.sidebar:\n        if st.button(\"Clear Chat\"):\n            st.session_state.messages = []\n            st.rerun()\n\n    # Display chat messages\n    for message in st.session_state.messages:\n        with st.chat_message(message[\"role\"]):\n            if message[\"role\"] == \"assistant\":\n                thinking, answer = extract_thinking_and_answer(message[\"content\"])\n                with st.expander(\"Show thinking process\"):\n                    st.markdown(thinking)\n                st.markdown(answer)\n            else:\n                st.markdown(message[\"content\"])\n\n    # Chat input\n    if prompt := st.chat_input(\"Ask your question about the Bhagavad Gita...\"):\n        # Display user message\n        st.chat_message(\"user\").markdown(prompt)\n        st.session_state.messages.append({\"role\": \"user\", \"content\": prompt})\n\n        # Generate and display response\n        with st.chat_message(\"assistant\"):\n            message_placeholder = st.empty()\n            with st.spinner(\"Thinking...\"):\n                full_response = pipeline(prompt, embed_model, llm, client)\n                thinking, answer = extract_thinking_and_answer(full_response.text)\n                \n                with st.expander(\"Show thinking process\"):\n                    st.markdown(thinking)\n                \n                response = \"\"\n                for chunk in answer.split():\n                    response += chunk + \" \"\n                    message_placeholder.markdown(response + \"\u258c\")\n                    sleep(0.05)\n                \n                message_placeholder.markdown(answer)\n                \n        # Add assistant response to history\n        st.session_state.messages.append({\"role\": \"assistant\", \"content\": full_response.text})\n\nif __name__ == \"__main__\":\n    main()<\/code><\/pre>\n<h4 class=\"wp-block-heading\" id=\"h-important-links\">Important Links<\/h4>\n<ul class=\"wp-block-list\">\n<li>You can find the full <a href=\"https:\/\/github.com\/lucifertrj\/Bhagavad-Gita-Assistant-Deepseek-R1\/\" rel=\"nofollow\">code<\/a><\/li>\n<li>Alternative Bhagavad Gita PDF- <a href=\"https:\/\/docs.google.com\/file\/d\/0B5WZMlc4xl-8NThSSDJnTmE5N2M\/edit?resourcekey=0-CupZPMHFLx-54g_UDTOTYA\" rel=\"nofollow\">Download<\/a><\/li>\n<li>Replace the \u201c<replace-api-key>\u201d placeholder with your keys.<\/replace-api-key><\/li>\n<\/ul>\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2>\n<p>By combining\u00a0Deepseek R1\u2019s reasoning,\u00a0Qdrant\u2019s binary quantization, and LlamaIndex\u2019s RAG pipeline, we\u2019ve built an AI assistant that delivers\u00a0sub-2-second responses\u00a0on 1,000+ pages. This project underscores how domain-specific LLMs and optimized vector databases can democratize access to ancient texts while maintaining cost efficiency. As open-source models continue to evolve, the possibilities for niche AI applications are limitless.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-key-takeaways\">Key Takeaways<\/h3>\n<ul class=\"wp-block-list\">\n<li>Deepseek R1 rivals OpenAI o1 in reasoning at 1\/27th the cost, ideal for domain-specific tasks like scripture analysis, while OpenAI suits broader knowledge needs.<\/li>\n<li>Understanding RAG Pipeline Implementation with demonstrated code examples for document processing, embedding generation, and vector storage using LlamaIndex and Qdrant.<\/li>\n<li>Efficient Vector Storage optimization through Binary Quantization in Qdrant, enabling processing of large document collections while maintaining performance and accuracy.<\/li>\n<li>Structured Prompt Engineering implementation with clear templates for handling multilingual queries (English, Hindi, Sanskrit) and managing out-of-context questions effectively.<\/li>\n<li>Interactive UI using Streamlit, to inference the application once stored in the vector database.<\/li>\n<\/ul>\n<h2 class=\"wp-block-heading\" id=\"h-frequently-asked-questions\">Frequently Asked Questions<\/h2>\n<div class=\"schema-faq wp-block-yoast-faq-block\">\n<div class=\"schema-faq-section\" id=\"faq-question-1739179657620\"><strong class=\"schema-faq-question\">Q1. <b>Does binary quantization reduce answer quality?<\/b><\/strong> <\/p>\n<p class=\"schema-faq-answer\">A. Minimal impact on recall! Qdrant\u2019s\u00a0oversampling\u00a0re-ranks top candidates using original vectors, maintaining accuracy while boosting speed 40x and slashing memory usage by 97%.<\/p>\n<\/p><\/div>\n<div class=\"schema-faq-section\" id=\"faq-question-1739179687039\"><strong class=\"schema-faq-question\">Q2. <b>Can the FastEmbed handle non-English texts like Sanskrit\/Hindi?<\/b><\/strong> <\/p>\n<p class=\"schema-faq-answer\">A. Yes! The RAG pipeline uses\u00a0FastEmbed\u2019s embeddings\u00a0and Deepseek R1\u2019s language flexibility. Custom prompts guide responses in English, Hindi, or Sanskrit. Whereas you can use the embedding model that can understand Hindi tokens, in our case the token used understand English and Hindi text.\u00a0<\/p>\n<\/p><\/div>\n<div class=\"schema-faq-section\" id=\"faq-question-1739179703332\"><strong class=\"schema-faq-question\">Q3. <b>Why choose Deepseek R1 over OpenAI o1?<\/b><\/strong> <\/p>\n<p class=\"schema-faq-answer\">A. Deepseek R1 offers\u00a027x lower API costs, comparable reasoning accuracy (20.5% vs o1\u2019s 21%), and superior coding\/domain-specific performance. It\u2019s ideal for specialized tasks like scripture analysis where cost and focused expertise matter.<\/p>\n<\/p><\/div>\n<\/p><\/div>\n<p><strong>The media shown in this article is not owned by Analytics Vidhya and is used at the Author\u2019s discretion.<\/strong><\/p>\n<div class=\"border-top py-3 author-info my-4\">\n<div class=\"author-card d-flex align-items-center\">\n<div class=\"flex-shrink-0 overflow-hidden\">\n                                    <a href=\"https:\/\/www.analyticsvidhya.com\/blog\/author\/tarun4641039\/\" class=\"text-decoration-none active-avatar\"><br \/>\n                                                                       <img decoding=\"async\" src=\"https:\/\/av-eks-lekhak.s3.amazonaws.com\/media\/lekhak-profile-images\/converted_image_4h3yIko.webp\" width=\"48\" height=\"48\" alt=\"Tarun R Jain\" loading=\"lazy\" class=\"rounded-circle\"\/><\/p>\n<p>                                <\/a>\n                                <\/div>\n<\/p><\/div>\n<p>Data Scientist at AI Planet || YouTube- AIWithTarun || Google Developer Expert in ML || Won 5 AI hackathons || Co-organizer of TensorFlow User Group Bangalore  || Pie &amp; AI Ambassador at DeepLearningAI        <\/p>\n<\/p><\/div>\n<\/p><\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>In the fast-evolving world of AI, large language models are pushing boundaries in speed, accuracy, and cost-efficiency. The recent release of Deepseek R1, an open-source model rivaling OpenAI\u2019s o1, is a hot topic in the AI space, especially given its 27x lower cost and superior reasoning capabilities. Pair this with Qdrant\u2019s binary quantization for efficient [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":80098,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12033],"tags":[28047,40281,5815,2539,40282],"dealstore":[],"offerexpiration":[],"class_list":["post-80097","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-analytics","tag-assistant","tag-bhagavad","tag-blogathon","tag-building","tag-gita"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Building a Bhagavad Gita AI Assistant - Som2ny Network<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fivemor.com\/?p=80097\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Building a Bhagavad Gita AI Assistant - Som2ny Network\" \/>\n<meta property=\"og:description\" content=\"In the fast-evolving world of AI, large language models are pushing boundaries in speed, accuracy, and cost-efficiency. The recent release of Deepseek R1, an open-source model rivaling OpenAI\u2019s o1, is a hot topic in the AI space, especially given its 27x lower cost and superior reasoning capabilities. Pair this with Qdrant\u2019s binary quantization for efficient [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fivemor.com\/?p=80097\" \/>\n<meta property=\"og:site_name\" content=\"Som2ny Network\" \/>\n<meta property=\"article:published_time\" content=\"2025-02-10T15:41:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/Building-a-Bhagavad-Gita-AI-Assistant-with-Deepseek-R1-Qdrant-LlamaIndex.webp.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"872\" \/>\n\t<meta property=\"og:image:height\" content=\"473\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"14 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fivemor.com\/?p=80097#article\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/?p=80097\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\"},\"headline\":\"Building a Bhagavad Gita AI Assistant\",\"datePublished\":\"2025-02-10T15:41:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=80097\"},\"wordCount\":1827,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=80097#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/Building-a-Bhagavad-Gita-AI-Assistant-with-Deepseek-R1-Qdrant-LlamaIndex.webp.webp\",\"keywords\":[\"Assistant\",\"Bhagavad\",\"Blogathon\",\"Building\",\"Gita\"],\"articleSection\":[\"Analytics\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fivemor.com\/?p=80097#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fivemor.com\/?p=80097\",\"url\":\"https:\/\/fivemor.com\/?p=80097\",\"name\":\"Building a Bhagavad Gita AI Assistant - Som2ny Network\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=80097#primaryimage\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=80097#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/Building-a-Bhagavad-Gita-AI-Assistant-with-Deepseek-R1-Qdrant-LlamaIndex.webp.webp\",\"datePublished\":\"2025-02-10T15:41:46+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fivemor.com\/?p=80097#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fivemor.com\/?p=80097\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/?p=80097#primaryimage\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/Building-a-Bhagavad-Gita-AI-Assistant-with-Deepseek-R1-Qdrant-LlamaIndex.webp.webp\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/Building-a-Bhagavad-Gita-AI-Assistant-with-Deepseek-R1-Qdrant-LlamaIndex.webp.webp\",\"width\":872,\"height\":473},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fivemor.com\/?p=80097#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/fivemor.com\/?bp_activities=1\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Building a Bhagavad Gita AI Assistant\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/fivemor.com\/#website\",\"url\":\"https:\/\/fivemor.com\/\",\"name\":\"Som2ny Network\",\"description\":\"Daily Deals\",\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/fivemor.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/fivemor.com\/#organization\",\"name\":\"Som2ny Network\",\"url\":\"https:\/\/fivemor.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png\",\"width\":300,\"height\":86,\"caption\":\"Som2ny Network\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/fivemor.com\"],\"url\":\"https:\/\/fivemor.com\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Building a Bhagavad Gita AI Assistant - Som2ny Network","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fivemor.com\/?p=80097","og_locale":"en_US","og_type":"article","og_title":"Building a Bhagavad Gita AI Assistant - Som2ny Network","og_description":"In the fast-evolving world of AI, large language models are pushing boundaries in speed, accuracy, and cost-efficiency. The recent release of Deepseek R1, an open-source model rivaling OpenAI\u2019s o1, is a hot topic in the AI space, especially given its 27x lower cost and superior reasoning capabilities. Pair this with Qdrant\u2019s binary quantization for efficient [&hellip;]","og_url":"https:\/\/fivemor.com\/?p=80097","og_site_name":"Som2ny Network","article_published_time":"2025-02-10T15:41:46+00:00","og_image":[{"width":872,"height":473,"url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/Building-a-Bhagavad-Gita-AI-Assistant-with-Deepseek-R1-Qdrant-LlamaIndex.webp.webp","type":"image\/webp"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"14 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fivemor.com\/?p=80097#article","isPartOf":{"@id":"https:\/\/fivemor.com\/?p=80097"},"author":{"name":"admin","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371"},"headline":"Building a Bhagavad Gita AI Assistant","datePublished":"2025-02-10T15:41:46+00:00","mainEntityOfPage":{"@id":"https:\/\/fivemor.com\/?p=80097"},"wordCount":1827,"commentCount":0,"publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"image":{"@id":"https:\/\/fivemor.com\/?p=80097#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/Building-a-Bhagavad-Gita-AI-Assistant-with-Deepseek-R1-Qdrant-LlamaIndex.webp.webp","keywords":["Assistant","Bhagavad","Blogathon","Building","Gita"],"articleSection":["Analytics"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fivemor.com\/?p=80097#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fivemor.com\/?p=80097","url":"https:\/\/fivemor.com\/?p=80097","name":"Building a Bhagavad Gita AI Assistant - Som2ny Network","isPartOf":{"@id":"https:\/\/fivemor.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fivemor.com\/?p=80097#primaryimage"},"image":{"@id":"https:\/\/fivemor.com\/?p=80097#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/Building-a-Bhagavad-Gita-AI-Assistant-with-Deepseek-R1-Qdrant-LlamaIndex.webp.webp","datePublished":"2025-02-10T15:41:46+00:00","breadcrumb":{"@id":"https:\/\/fivemor.com\/?p=80097#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fivemor.com\/?p=80097"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/?p=80097#primaryimage","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/Building-a-Bhagavad-Gita-AI-Assistant-with-Deepseek-R1-Qdrant-LlamaIndex.webp.webp","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/Building-a-Bhagavad-Gita-AI-Assistant-with-Deepseek-R1-Qdrant-LlamaIndex.webp.webp","width":872,"height":473},{"@type":"BreadcrumbList","@id":"https:\/\/fivemor.com\/?p=80097#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fivemor.com\/?bp_activities=1"},{"@type":"ListItem","position":2,"name":"Building a Bhagavad Gita AI Assistant"}]},{"@type":"WebSite","@id":"https:\/\/fivemor.com\/#website","url":"https:\/\/fivemor.com\/","name":"Som2ny Network","description":"Daily Deals","publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fivemor.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/fivemor.com\/#organization","name":"Som2ny Network","url":"https:\/\/fivemor.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/#\/schema\/logo\/image\/","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png","width":300,"height":86,"caption":"Som2ny Network"},"image":{"@id":"https:\/\/fivemor.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png","caption":"admin"},"sameAs":["https:\/\/fivemor.com"],"url":"https:\/\/fivemor.com\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/80097","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=80097"}],"version-history":[{"count":0,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/80097\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/media\/80098"}],"wp:attachment":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=80097"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=80097"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=80097"},{"taxonomy":"dealstore","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdealstore&post=80097"},{"taxonomy":"offerexpiration","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fofferexpiration&post=80097"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}