File size: 24,433 Bytes
97ee08c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 📱 Using RAG to perform analysis of AirBNB Quarterly Report! 🤖\n",
    "\n",
    "[AirBNB Quarterly Report For the quarterly period ended March 31, 2024](https://airbnb2020ipo.q4web.com/files/doc_financials/2024/q1/fdb60f7d-e616-43dc-86ef-e33d3a9bdd05.pdf)\n",
    "\n",
    "## Question 1\n",
    "- question: What is Airbnb's 'Description of Business'?\n",
    "- response: Airbnb's 'Description of Business' is operating a global platform for unique stays and experiences, connecting hosts and guests online or through mobile devices to book spaces and experiences around the world.\n",
    "- LangSmith trace: https://smith.langchain.com/public/ebdf5473-64ac-4f85-81ab-bd3c3d624969/r\n",
    "\n",
    "## Question 2\n",
    "- question: What was the total value of 'Cash and cash equivalents' as of December 31, 2023?\n",
    "- response: The total value of 'Cash and cash equivalents' as of December 31, 2023, is $2,369.\n",
    "- LangSmith trace: https://smith.langchain.com/public/b0f93487-c729-4ccf-93f9-0354078282d8/r\n",
    "\n",
    "## Question 3\n",
    "- question: What is the 'maximum number of shares to be sold under the 10b5-1 Trading plan' by Brian Chesky?\n",
    "- response: The maximum number of shares to be sold under the 10b5-1 Trading plan by Brian Chesky is 1,146,000.\n",
    "- LangSmith trace: https://smith.langchain.com/public/7fc4b549-2ea5-4b86-abf9-71d5e9a62738/r"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Note: you may need to restart the kernel to use updated packages.\n",
      "Note: you may need to restart the kernel to use updated packages.\n",
      "Note: you may need to restart the kernel to use updated packages.\n",
      "Note: you may need to restart the kernel to use updated packages.\n",
      "Note: you may need to restart the kernel to use updated packages.\n"
     ]
    }
   ],
   "source": [
    "%pip install -qU pymupdf \n",
    "%pip install -qU langchain langchain-core langchain-community langchain-text-splitters \n",
    "%pip install -qU langchain-openai\n",
    "%pip install -qU langchain-groq\n",
    "%pip install -qU langchain-qdrant"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "from langchain import hub\n",
    "from langchain_groq import ChatGroq\n",
    "\n",
    "llm = ChatGroq(model=\"llama3-70b-8192\", temperature=0.3)\n",
    "\n",
    "os.environ[\"GROQ_API_KEY\"] = os.getenv(\"GROQ_API_KEY\")\n",
    "os.environ[\"OPENAI_API_KEY\"] = os.getenv(\"OPENAI_API_KEY\")\n",
    "\n",
    "QDRANT_API_KEY = os.getenv(\"QDRANT_API_KEY\")\n",
    "QDRANT_API_URL = os.getenv(\"QDRANT_URL\")\n",
    "\n",
    "# LangSmith tracing and \n",
    "os.environ[\"LANGCHAIN_PROJECT\"] = \"AirBnB PDF Jun18\"\n",
    "os.environ[\"LANGCHAIN_ENDPOINT\"]=os.getenv(\"LANGCHAIN_ENDPOINT\")\n",
    "os.environ[\"LANGCHAIN_API_KEY\"]=os.getenv(\"LANGCHAIN_API_KEY\")\n",
    "os.environ[\"LANGCHAIN_TRACING_V2\"]=os.getenv(\"LANGCHAIN_TRACING_V2\")\n",
    "\n",
    "# Leverage a prompt from the LangChain hub\n",
    "prompt = hub.pull(\"rlm/rag-prompt-llama3\")\n",
    "# prompt = hub.pull(\"cracked-nut/securities-comm-llama3\")\n",
    "# prompt = hub.pull(\"cracked-nut/securities-comm-llama3-v2\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Parameterize some stuff\n",
    "\n",
    "LOAD_NEW_DATA = False # Set to True to load new data\n",
    "FILE_PATH = \"/home/donbr/aie3-bootcamp/AIE3/Week 3/Day 2/files/airbnb.pdf\" # Path to the source PDF file\n",
    "collection = \"airbnb_pdf_rec_1000_200_images\" # qdrant collection name\n",
    "\n",
    "# QUESTION = \"What is Airbnb's 'Description of Business'?\"\n",
    "QUESTION = \"What was the total value of 'Cash and cash equivalents' as of December 31, 2023?\"\n",
    "# QUESTION = \"What is the 'maximum number of shares to be sold under the 10b5-1 Trading plan' by Brian Chesky?\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "from langchain_community.document_loaders import PyMuPDFLoader\n",
    "from langchain_text_splitters import RecursiveCharacterTextSplitter\n",
    "from langchain_qdrant import Qdrant"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "from langchain_openai import OpenAIEmbeddings\n",
    "\n",
    "embedding = OpenAIEmbeddings(model=\"text-embedding-3-small\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "# run loader if LOAD_NEW_DATA is True\n",
    "if LOAD_NEW_DATA:\n",
    "    loader = PyMuPDFLoader(FILE_PATH, extract_images=True)\n",
    "    docs = loader.load()\n",
    "\n",
    "    text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=200)\n",
    "    splits = text_splitter.split_documents(docs)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Store the chunks in Qdrant\n",
    "if LOAD_NEW_DATA:\n",
    "    from_splits = Qdrant.from_documents(\n",
    "        embedding=embedding,\n",
    "        collection_name=collection,\n",
    "        url=QDRANT_API_URL,\n",
    "        api_key=QDRANT_API_KEY,\n",
    "        prefer_grpc=True,   \n",
    "        documents=splits,\n",
    "    )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "qdrant = Qdrant.from_existing_collection(\n",
    "    embedding=embedding,\n",
    "    collection_name=collection,\n",
    "    url=QDRANT_API_URL,\n",
    "    api_key=QDRANT_API_KEY,\n",
    "    prefer_grpc=True,     \n",
    ")\n",
    "\n",
    "# retriever = qdrant.as_retriever(search_type=\"mmr\", search_kwargs={\"k\": 8})\n",
    "\n",
    "# retriever = qdrant.as_retriever(search_kwargs={\"k\": 5})\n",
    "\n",
    "retriever = qdrant.as_retriever(\n",
    "    search_type=\"similarity_score_threshold\",\n",
    "    search_kwargs={\"score_threshold\": 0.5, \"k\": 5}\n",
    ")\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "from operator import itemgetter\n",
    "from langchain.schema.runnable import RunnablePassthrough\n",
    "\n",
    "rag_chain = (\n",
    "    {\"context\": itemgetter(\"question\") | retriever, \"question\": itemgetter(\"question\")}\n",
    "    | RunnablePassthrough.assign(context=itemgetter(\"context\"))\n",
    "    | {\"response\": prompt | llm, \"context\": itemgetter(\"context\")}\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                      +---------------------------------+                        \n",
      "                      | Parallel<context,question>Input |                        \n",
      "                      +---------------------------------+                        \n",
      "                           ****                   ****                           \n",
      "                       ****                           ***                        \n",
      "                     **                                  ****                    \n",
      "+--------------------------------+                           **                  \n",
      "| Lambda(itemgetter('question')) |                            *                  \n",
      "+--------------------------------+                            *                  \n",
      "                 *                                            *                  \n",
      "                 *                                            *                  \n",
      "                 *                                            *                  \n",
      "     +----------------------+                 +--------------------------------+ \n",
      "     | VectorStoreRetriever |                 | Lambda(itemgetter('question')) | \n",
      "     +----------------------+                 +--------------------------------+ \n",
      "                           ****                   ****                           \n",
      "                               ****           ****                               \n",
      "                                   **       **                                   \n",
      "                      +----------------------------------+                       \n",
      "                      | Parallel<context,question>Output |                       \n",
      "                      +----------------------------------+                       \n",
      "                                        *                                        \n",
      "                                        *                                        \n",
      "                                        *                                        \n",
      "                           +------------------------+                            \n",
      "                           | Parallel<context>Input |                            \n",
      "                           +------------------------+                            \n",
      "                              ***               ***                              \n",
      "                           ***                     ***                           \n",
      "                         **                           **                         \n",
      "     +-------------------------------+            +-------------+                \n",
      "     | Lambda(itemgetter('context')) |            | Passthrough |                \n",
      "     +-------------------------------+            +-------------+                \n",
      "                              ***               ***                              \n",
      "                                 ***         ***                                 \n",
      "                                    **     **                                    \n",
      "                          +-------------------------+                            \n",
      "                          | Parallel<context>Output |                            \n",
      "                          +-------------------------+                            \n",
      "                                        *                                        \n",
      "                                        *                                        \n",
      "                                        *                                        \n",
      "                      +---------------------------------+                        \n",
      "                      | Parallel<response,context>Input |                        \n",
      "                      +---------------------------------+                        \n",
      "                            ****                 ***                             \n",
      "                         ***                        ***                          \n",
      "                       **                              ****                      \n",
      "         +--------------------+                            **                    \n",
      "         | ChatPromptTemplate |                             *                    \n",
      "         +--------------------+                             *                    \n",
      "                    *                                       *                    \n",
      "                    *                                       *                    \n",
      "                    *                                       *                    \n",
      "              +----------+                 +-------------------------------+     \n",
      "              | ChatGroq |                 | Lambda(itemgetter('context')) |     \n",
      "              +----------+**               +-------------------------------+     \n",
      "                            ****                ****                             \n",
      "                                ***          ***                                 \n",
      "                                   **      **                                    \n",
      "                      +----------------------------------+                       \n",
      "                      | Parallel<response,context>Output |                       \n",
      "                      +----------------------------------+                       \n"
     ]
    }
   ],
   "source": [
    "print(rag_chain.get_graph().draw_ascii())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "response = rag_chain.invoke({\"question\" : QUESTION})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The total value of 'Cash and cash equivalents' as of December 31, 2023, is $2,369.\n"
     ]
    }
   ],
   "source": [
    "# return the response.  filter on the response key AIMessage content element\n",
    "print(response[\"response\"].content)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[Document(page_content='December 31, 2023\\nLevel\\xa01\\nLevel\\xa02\\nLevel\\xa03\\nTotal\\nAssets\\nCash and cash equivalents:\\nMoney market funds\\n$\\n2,018\\xa0 $\\n—\\xa0 $\\n—\\xa0 $\\n2,018\\xa0\\nCertificates of deposit\\n—\\xa0\\n1\\xa0\\n—\\xa0\\n1\\xa0\\nGovernment bonds\\n—\\xa0\\n115\\xa0\\n—\\xa0\\n115\\xa0\\nCommercial paper\\n—\\xa0\\n223\\xa0\\n—\\xa0\\n223\\xa0\\nCorporate debt securities\\n—\\xa0\\n12\\xa0\\n—\\xa0\\n12\\xa0\\n2,018\\xa0\\n351\\xa0\\n—\\xa0\\n2,369\\xa0\\nShort-term investments:\\nCertificates of deposit\\n—\\xa0\\n172\\xa0\\n—\\xa0\\n172\\xa0\\nGovernment bonds\\n—\\xa0\\n333\\xa0\\n—\\xa0\\n333\\xa0\\nCommercial paper\\n—\\xa0\\n366\\xa0\\n—\\xa0\\n366\\xa0\\nCorporate debt securities\\n—\\xa0\\n1,491\\xa0\\n—\\xa0\\n1,491\\xa0\\nMortgage-backed and asset-backed securities\\n—\\xa0\\n145\\xa0\\n—\\xa0\\n145\\xa0\\n—\\xa0\\n2,507\\xa0\\n—\\xa0\\n2,507\\xa0\\nFunds receivable and amounts held on behalf of customers:\\nMoney market funds\\n1,360\\xa0\\n—\\xa0\\n—\\xa0\\n1,360\\xa0\\nPrepaids and other current assets:\\nForeign exchange derivative assets\\n—\\xa0\\n27\\xa0\\n—\\xa0\\n27\\xa0\\nOther assets, noncurrent:\\nCorporate debt securities\\n—\\xa0\\n—\\xa0\\n4\\xa0\\n4\\xa0\\nTotal assets at fair value\\n$\\n3,378\\xa0 $\\n2,885\\xa0 $\\n4\\xa0 $\\n6,267\\xa0\\nLiabilities\\nAccrued expenses, accounts payable, and other current liabilities:\\nForeign exchange derivative liabilities\\n$\\n—\\xa0 $\\n55\\xa0 $\\n—\\xa0 $\\n55', metadata={'subject': 'Form 10-Q filed on 2024-05-08 for the period ending 2024-03-31', 'creator': 'EDGAR Filing HTML Converter', 'total_pages': 54, 'keywords': '0001559720-24-000017; ; 10-Q', 'modDate': \"D:20240508161807-04'00'\", 'encryption': 'Standard V2 R3 128-bit RC4', 'trapped': '', 'format': 'PDF 1.4', 'creationDate': \"D:20240508161757-04'00'\", 'source': '/home/donbr/aie3-bootcamp/AIE3/Week 3/Day 2/files/airbnb.pdf', 'file_path': '/home/donbr/aie3-bootcamp/AIE3/Week 3/Day 2/files/airbnb.pdf', 'producer': 'EDGRpdf Service w/ EO.Pdf 22.0.40.0', 'page': 12, 'title': '0001559720-24-000017', 'author': 'EDGAR® Online LLC, a subsidiary of OTC Markets Group', '_id': '5e811a77-6780-4705-8052-062160087f10', '_collection_name': 'airbnb_pdf_rec_1000_200_images'}),\n",
       " Document(page_content='Our cash and cash equivalents are generally held at large global systemically important banks (or “G-SIBs”) which are subject to high capital requirements and are required to\\nregularly perform stringent stress tests related to their ability to absorb capital losses. Our cash, cash equivalents, and short-term investments held outside the United States may be\\nrepatriated, subject to certain limitations, and would be available to be used to fund our domestic operations. However, repatriation of such funds may result in additional tax\\nliabilities. We believe that our existing cash, cash equivalents, and short-term investments balances in the United States are sufficient to fund our working capital needs in the United\\nStates.\\nWe have access to $1.0 billion of commitments and a $200\\xa0million sub-limit for the issuance of letters of credit under the 2022 Credit Facility. As of March\\xa031, 2024, no amounts were', metadata={'subject': 'Form 10-Q filed on 2024-05-08 for the period ending 2024-03-31', 'creator': 'EDGAR Filing HTML Converter', 'total_pages': 54, 'keywords': '0001559720-24-000017; ; 10-Q', 'modDate': \"D:20240508161807-04'00'\", 'encryption': 'Standard V2 R3 128-bit RC4', 'trapped': '', 'format': 'PDF 1.4', 'source': '/home/donbr/aie3-bootcamp/AIE3/Week 3/Day 2/files/airbnb.pdf', 'creationDate': \"D:20240508161757-04'00'\", 'file_path': '/home/donbr/aie3-bootcamp/AIE3/Week 3/Day 2/files/airbnb.pdf', 'producer': 'EDGRpdf Service w/ EO.Pdf 22.0.40.0', 'page': 28, 'title': '0001559720-24-000017', 'author': 'EDGAR® Online LLC, a subsidiary of OTC Markets Group', '_id': '9c9e6975-1d72-4c4d-9b9e-c129dfe56ddb', '_collection_name': 'airbnb_pdf_rec_1000_200_images'}),\n",
       " Document(page_content='2023 and March\\xa031, 2024, respectively. A total of $283 million and $479 million of these securities, with unrealized losses of $14 million and $16 million, were in a continuous\\nunrealized loss position for more than twelve months as of December\\xa031, 2023 and March\\xa031, 2024, respectively.\\nThe following table summarizes the contractual maturities of the Company’s available-for-sale debt securities (in millions):\\nMarch 31, 2024\\nAmortized\\nCost\\nEstimated\\nFair Value\\nDue within one year\\n$\\n1,489\\xa0 $\\n1,489\\xa0\\nDue after one year through five years\\n957\\xa0\\n947\\xa0\\nDue after five years\\n96\\xa0\\n92\\xa0\\nTotal\\n$\\n2,542\\xa0 $\\n2,528\\xa0\\nNote 5. Fair Value Measurements and Financial Instruments\\nThe following table summarizes the Company’s financial assets and liabilities measured at fair value on a recurring basis (in millions):\\nDecember 31, 2023\\nLevel\\xa01\\nLevel\\xa02\\nLevel\\xa03\\nTotal\\nAssets\\nCash and cash equivalents:\\nMoney market funds\\n$\\n2,018\\xa0 $\\n—\\xa0 $\\n—\\xa0 $\\n2,018\\xa0\\nCertificates of deposit\\n—\\xa0\\n1\\xa0\\n—\\xa0\\n1\\xa0\\nGovernment bonds\\n—\\xa0\\n115\\xa0\\n—\\xa0\\n115', metadata={'subject': 'Form 10-Q filed on 2024-05-08 for the period ending 2024-03-31', 'creator': 'EDGAR Filing HTML Converter', 'total_pages': 54, 'keywords': '0001559720-24-000017; ; 10-Q', 'trapped': '', 'encryption': 'Standard V2 R3 128-bit RC4', 'modDate': \"D:20240508161807-04'00'\", 'format': 'PDF 1.4', 'creationDate': \"D:20240508161757-04'00'\", 'file_path': '/home/donbr/aie3-bootcamp/AIE3/Week 3/Day 2/files/airbnb.pdf', 'source': '/home/donbr/aie3-bootcamp/AIE3/Week 3/Day 2/files/airbnb.pdf', 'producer': 'EDGRpdf Service w/ EO.Pdf 22.0.40.0', 'page': 12, 'title': '0001559720-24-000017', 'author': 'EDGAR® Online LLC, a subsidiary of OTC Markets Group', '_id': '8e24fa1f-628b-4773-9011-e5ba6e97d830', '_collection_name': 'airbnb_pdf_rec_1000_200_images'}),\n",
       " Document(page_content='$\\n12,667\\xa0 $\\n16,529\\xa0\\nSupplemental disclosures of balance sheet information\\nSupplemental balance sheet information consisted of the following (in millions):\\nDecember 31,\\n2023\\nMarch 31,\\n2024\\nOther assets, noncurrent:\\nProperty and equipment, net\\n$\\n160\\xa0 $\\n171\\xa0\\nOperating lease right-of-use assets\\n119\\xa0\\n111\\xa0\\nOther\\n184\\xa0\\n190\\xa0\\nOther assets, noncurrent\\n$\\n463\\xa0 $\\n472\\xa0\\nAccrued expenses, accounts payable, and other current liabilities:\\nIndirect taxes payable and withholding tax reserves\\n$\\n1,119\\xa0 $\\n1,455\\xa0\\nCompensation and employee benefits\\n436\\xa0\\n346\\xa0\\nAccounts payable\\n141\\xa0\\n184\\xa0\\nOperating lease liabilities, current\\n61\\xa0\\n61\\xa0\\nOther\\n897\\xa0\\n922\\xa0\\nAccrued expenses, accounts payable, and other current liabilities\\n$\\n2,654\\xa0 $\\n2,968\\xa0\\nOther liabilities, noncurrent:\\nOperating lease liabilities, noncurrent\\n$\\n252\\xa0 $\\n237\\xa0\\nOther liabilities, noncurrent\\n287\\xa0\\n273\\xa0\\nOther liabilities, noncurrent\\n$\\n539\\xa0 $\\n510\\xa0\\nPayments to Customers', metadata={'subject': 'Form 10-Q filed on 2024-05-08 for the period ending 2024-03-31', 'creator': 'EDGAR Filing HTML Converter', 'total_pages': 54, 'keywords': '0001559720-24-000017; ; 10-Q', 'modDate': \"D:20240508161807-04'00'\", 'encryption': 'Standard V2 R3 128-bit RC4', 'trapped': '', 'format': 'PDF 1.4', 'source': '/home/donbr/aie3-bootcamp/AIE3/Week 3/Day 2/files/airbnb.pdf', 'file_path': '/home/donbr/aie3-bootcamp/AIE3/Week 3/Day 2/files/airbnb.pdf', 'creationDate': \"D:20240508161757-04'00'\", 'producer': 'EDGRpdf Service w/ EO.Pdf 22.0.40.0', 'page': 10, 'title': '0001559720-24-000017', 'author': 'EDGAR® Online LLC, a subsidiary of OTC Markets Group', '_id': '28a8a595-2736-403b-a5c3-8411353cc470', '_collection_name': 'airbnb_pdf_rec_1000_200_images'}),\n",
       " Document(page_content='Table of Contents\\nAirbnb, Inc.\\nNotes to Condensed Consolidated Financial Statements (unaudited)\\nNote 3. Supplemental Financial Statement Information\\nCash, Cash Equivalents, and Restricted Cash\\nThe following table reconciles cash, cash equivalents, and restricted cash reported on the Company’s unaudited condensed consolidated balance sheets to the total amount\\npresented in the unaudited condensed consolidated statements of cash flows (in millions):\\nDecember 31,\\n2023\\nMarch 31,\\n2024\\nCash and cash equivalents\\n$\\n6,874\\xa0 $\\n7,829\\xa0\\nCash and cash equivalents included in funds receivable and amounts held on behalf of customers\\n5,769\\xa0\\n8,665\\xa0\\nRestricted cash included in prepaids and other current assets\\n24\\xa0\\n35\\xa0\\nTotal cash, cash equivalents, and restricted cash presented in the unaudited condensed consolidated statements of cash flows\\n$\\n12,667\\xa0 $\\n16,529\\xa0\\nSupplemental disclosures of balance sheet information\\nSupplemental balance sheet information consisted of the following (in millions):\\nDecember 31,', metadata={'subject': 'Form 10-Q filed on 2024-05-08 for the period ending 2024-03-31', 'creator': 'EDGAR Filing HTML Converter', 'total_pages': 54, 'keywords': '0001559720-24-000017; ; 10-Q', 'trapped': '', 'encryption': 'Standard V2 R3 128-bit RC4', 'modDate': \"D:20240508161807-04'00'\", 'format': 'PDF 1.4', 'creationDate': \"D:20240508161757-04'00'\", 'file_path': '/home/donbr/aie3-bootcamp/AIE3/Week 3/Day 2/files/airbnb.pdf', 'source': '/home/donbr/aie3-bootcamp/AIE3/Week 3/Day 2/files/airbnb.pdf', 'producer': 'EDGRpdf Service w/ EO.Pdf 22.0.40.0', 'page': 10, 'title': '0001559720-24-000017', 'author': 'EDGAR® Online LLC, a subsidiary of OTC Markets Group', '_id': 'fc69f02a-bdc5-443a-8e3e-8e2254b6012a', '_collection_name': 'airbnb_pdf_rec_1000_200_images'})]"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "response[\"context\"]"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}