Skip to content

Commit

Permalink
Fix incorrect file path
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikaPark committed Jan 9, 2025
1 parent 1df3339 commit 696867f
Showing 1 changed file with 27 additions and 17 deletions.
44 changes: 27 additions & 17 deletions 10-Retriever/01-VectorStoreRetriever.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,16 @@
")"
]
},
{
"cell_type": "markdown",
"id": "90c24f41",
"metadata": {},
"source": [
"You can alternatively set API keys such as `OPENAI_API_KEY` in a `.env` file and load them.\n",
"\n",
"[Note] This is not necessary if you've already set the required API keys in previous steps."
]
},
{
"cell_type": "code",
"execution_count": 4,
Expand Down Expand Up @@ -218,7 +228,7 @@
"from langchain_community.document_loaders import TextLoader\n",
"\n",
"# Load the file using TextLoader\n",
"loader = TextLoader(\"./assets/01-vectorstore-retriever-appendix-keywords.txt\", encoding=\"utf-8\")\n",
"loader = TextLoader(\"./data/01-vectorstore-retriever-appendix-keywords.txt\", encoding=\"utf-8\")\n",
"documents = loader.load()\n",
"\n",
"# split the text into chunks\n",
Expand Down Expand Up @@ -493,7 +503,7 @@
"πŸ“„ Document Content: Definition: A DataFrame is a tabular data structure with rows and columns, commonly used for data analysis and manipulation.\n",
"Example: Pandas DataFrame can store data like an Excel sheet and perform operations like filtering and grouping.\n",
"Related Keywords: Data Analysis, Pandas, Data Manipulation\n",
"πŸ—‚οΈ Metadata: {'source': './assets/01-vectorstore-retriever-appendix-keywords.txt'}\n",
"πŸ—‚οΈ Metadata: {'source': './data/01-vectorstore-retriever-appendix-keywords.txt'}\n",
"============================================================\n",
"\n",
"πŸ” [Search Result 2]\n",
Expand All @@ -504,7 +514,7 @@
"Related Keywords: Database, Data Modeling, Data Management\n",
"\n",
"DataFrame\n",
"πŸ—‚οΈ Metadata: {'source': './assets/01-vectorstore-retriever-appendix-keywords.txt'}\n",
"πŸ—‚οΈ Metadata: {'source': './data/01-vectorstore-retriever-appendix-keywords.txt'}\n",
"============================================================\n",
"\n",
"πŸ” [Search Result 3]\n",
Expand All @@ -513,12 +523,12 @@
"Definition: Pandas is a Python library for data analysis and manipulation, offering tools for working with structured data.\n",
"Example: Pandas can read CSV files, clean data, and perform statistical analysis.\n",
"Related Keywords: Data Analysis, Python, Data Manipulation\n",
"πŸ—‚οΈ Metadata: {'source': './assets/01-vectorstore-retriever-appendix-keywords.txt'}\n",
"πŸ—‚οΈ Metadata: {'source': './data/01-vectorstore-retriever-appendix-keywords.txt'}\n",
"============================================================\n",
"\n",
"πŸ” [Search Result 4]\n",
"πŸ“„ Document Content: Data Mining\n",
"πŸ—‚οΈ Metadata: {'source': './assets/01-vectorstore-retriever-appendix-keywords.txt'}\n",
"πŸ—‚οΈ Metadata: {'source': './data/01-vectorstore-retriever-appendix-keywords.txt'}\n",
"============================================================\n"
]
}
Expand Down Expand Up @@ -584,17 +594,17 @@
"\n",
"πŸ“„ [Document 1]\n",
"πŸ“– Document Content: Embedding\n",
"πŸ—‚οΈ Metadata: {'source': './assets/01-vectorstore-retriever-appendix-keywords.txt'}\n",
"πŸ—‚οΈ Metadata: {'source': './data/01-vectorstore-retriever-appendix-keywords.txt'}\n",
"============================================================\n",
"πŸ“„ [Document 2]\n",
"πŸ“– Document Content: Definition: Embedding is the process of converting text data, such as words or sentences, into continuous low-dimensional vectors. This allows computers to understand and process text.\n",
"Example: The word \"apple\" can be represented as a vector like [0.65, -0.23, 0.17].\n",
"Related Keywords: Natural Language Processing, Vectorization, Deep Learning\n",
"πŸ—‚οΈ Metadata: {'source': './assets/01-vectorstore-retriever-appendix-keywords.txt'}\n",
"πŸ—‚οΈ Metadata: {'source': './data/01-vectorstore-retriever-appendix-keywords.txt'}\n",
"============================================================\n",
"πŸ“„ [Document 3]\n",
"πŸ“– Document Content: TF-IDF (Term Frequency-Inverse Document Frequency)\n",
"πŸ—‚οΈ Metadata: {'source': './assets/01-vectorstore-retriever-appendix-keywords.txt'}\n",
"πŸ—‚οΈ Metadata: {'source': './data/01-vectorstore-retriever-appendix-keywords.txt'}\n",
"============================================================\n"
]
}
Expand Down Expand Up @@ -658,25 +668,25 @@
"Definition: Word2Vec is a technique in NLP that maps words into a vector space, representing their semantic relationships based on context.\n",
"Example: In Word2Vec, \"king\" and \"queen\" would be represented by vectors close to each other.\n",
"Related Keywords: NLP, Embeddings, Semantic Similarity\n",
"πŸ—‚οΈ Metadata: {'source': './assets/01-vectorstore-retriever-appendix-keywords.txt'}\n",
"πŸ—‚οΈ Metadata: {'source': './data/01-vectorstore-retriever-appendix-keywords.txt'}\n",
"============================================================\n",
"πŸ“„ [Document 2]\n",
"πŸ“– Document Content: Definition: Embedding is the process of converting text data, such as words or sentences, into continuous low-dimensional vectors. This allows computers to understand and process text.\n",
"Example: The word \"apple\" can be represented as a vector like [0.65, -0.23, 0.17].\n",
"Related Keywords: Natural Language Processing, Vectorization, Deep Learning\n",
"πŸ—‚οΈ Metadata: {'source': './assets/01-vectorstore-retriever-appendix-keywords.txt'}\n",
"πŸ—‚οΈ Metadata: {'source': './data/01-vectorstore-retriever-appendix-keywords.txt'}\n",
"============================================================\n",
"πŸ“„ [Document 3]\n",
"πŸ“– Document Content: TF-IDF (Term Frequency-Inverse Document Frequency)\n",
"πŸ—‚οΈ Metadata: {'source': './assets/01-vectorstore-retriever-appendix-keywords.txt'}\n",
"πŸ—‚οΈ Metadata: {'source': './data/01-vectorstore-retriever-appendix-keywords.txt'}\n",
"============================================================\n",
"πŸ“„ [Document 4]\n",
"πŸ“– Document Content: Tokenizer\n",
"πŸ—‚οΈ Metadata: {'source': './assets/01-vectorstore-retriever-appendix-keywords.txt'}\n",
"πŸ—‚οΈ Metadata: {'source': './data/01-vectorstore-retriever-appendix-keywords.txt'}\n",
"============================================================\n",
"πŸ“„ [Document 5]\n",
"πŸ“– Document Content: Semantic Search\n",
"πŸ—‚οΈ Metadata: {'source': './assets/01-vectorstore-retriever-appendix-keywords.txt'}\n",
"πŸ—‚οΈ Metadata: {'source': './data/01-vectorstore-retriever-appendix-keywords.txt'}\n",
"============================================================\n"
]
}
Expand Down Expand Up @@ -734,7 +744,7 @@
"\n",
"πŸ“„ [Document 1]\n",
"πŸ“– Document Content: Embedding\n",
"πŸ—‚οΈ Metadata: {'source': './assets/01-vectorstore-retriever-appendix-keywords.txt'}\n",
"πŸ—‚οΈ Metadata: {'source': './data/01-vectorstore-retriever-appendix-keywords.txt'}\n",
"============================================================\n"
]
}
Expand Down Expand Up @@ -1020,7 +1030,7 @@
"from langchain_upstage import UpstageEmbeddings\n",
"\n",
"# βœ… 1. Data Loading and Document Splitting\n",
"loader = TextLoader(\"./assets/01-vectorstore-retriever-appendix-keywords.txt\", encoding=\"utf-8\")\n",
"loader = TextLoader(\"./data/01-vectorstore-retriever-appendix-keywords.txt\", encoding=\"utf-8\")\n",
"documents = loader.load()\n",
"\n",
"# Split the loaded documents into text chunks \n",
Expand Down Expand Up @@ -1057,13 +1067,13 @@
"\n",
"πŸ“„ [Document 1]\n",
"πŸ“– Document Content: Embedding\n",
"πŸ—‚οΈ Metadata: {'source': './assets/01-vectorstore-retriever-appendix-keywords.txt'}\n",
"πŸ—‚οΈ Metadata: {'source': './data/01-vectorstore-retriever-appendix-keywords.txt'}\n",
"============================================================\n",
"πŸ“„ [Document 2]\n",
"πŸ“– Document Content: Definition: Embedding is the process of converting text data, such as words or sentences, into continuous low-dimensional vectors. This allows computers to understand and process text.\n",
"Example: The word \"apple\" can be represented as a vector like [0.65, -0.23, 0.17].\n",
"Related Keywords: Natural Language Processing, Vectorization, Deep Learning\n",
"πŸ—‚οΈ Metadata: {'source': './assets/01-vectorstore-retriever-appendix-keywords.txt'}\n",
"πŸ—‚οΈ Metadata: {'source': './data/01-vectorstore-retriever-appendix-keywords.txt'}\n",
"============================================================\n"
]
}
Expand Down

0 comments on commit 696867f

Please sign in to comment.