title
13. Large Language Models with Semantic Search| DeepLearning.ai - Full Course

description
The course comes from [https://learn.deeplearning.ai/large-language-models-semantic-search/lesson/1/introduction](https://learn.deeplearning.ai/large-language-models-semantic-search/lesson/1/introduction) created by Andrew Ng This YouTube video is a short course on large language models and semantic search. The course covers how to introduce large language models (LMs) for information search in your own applications. By using LMs, users can ask questions and the system will search the website or database to answer them and provide more relevant results through semantic search. The course is taught by two experienced machine learning engineers and educators, Jay Alomare and Luis Serrano. They have extensive experience with Cohere's LOMU project and this course will teach developers how to use LMs for semantic search. Get free course notes: https://t.me/NoteForYoutubeCourse

detail
{'title': '13. Large Language Models with Semantic Search| DeepLearning.ai - Full Course', 'heatmap': [], 'summary': "Delves into large language models (llms) for semantic search, covering topics such as keyword search, dense retrieval with embeddings, weaviate database, v8's vector search method, text processing techniques, and ai application. instructors jay alamir and luis serrano provide insights into incorporating llms to improve search relevance and question answering capabilities.", 'chapters': [{'end': 369.067, 'segs': [{'end': 52.735, 'src': 'embed', 'start': 23.65, 'weight': 0, 'content': [{'end': 29.295, 'text': 'Even before LLMs, it was common to have keyword search to let people maybe search your site.', 'start': 23.65, 'duration': 5.645}, {'end': 31.857, 'text': 'But with LLMs, you can now do much more.', 'start': 29.635, 'duration': 2.222}, {'end': 38.403, 'text': 'First, you can let users ask questions that your system then searches your site or database to answer.', 'start': 32.537, 'duration': 5.866}, {'end': 47.451, 'text': 'And second, the LLM is also making the retrieved results more relevant to the meaning or the semantics of what the user is asking about.', 'start': 39.264, 'duration': 8.187}, {'end': 52.735, 'text': "I'd like to introduce the instructors for this course, Jay Alamir and Luis Serrano.", 'start': 47.771, 'duration': 4.964}], 'summary': 'Llms enable advanced search capabilities, including question-answering and semantic relevance.', 'duration': 29.085, 'max_score': 23.65, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k23650.jpg'}, {'end': 233.529, 'src': 'embed', 'start': 200.824, 'weight': 1, 'content': [{'end': 207.268, 'text': 'you also learn how to plug in the search results into an LLM and have it generate an answer based on them.', 'start': 200.824, 'duration': 6.444}, {'end': 213.813, 'text': 'Dense retrieval with embeddings vastly improves the question on string capabilities of an LLM,', 'start': 207.768, 'duration': 6.045}, {'end': 220.318, 'text': 'as it first searches for and retrieves the relevant documents and it creates an answer from this retrieved information.', 'start': 213.813, 'duration': 6.505}, {'end': 223.14, 'text': 'Many people have contributed to this course.', 'start': 221.019, 'duration': 2.121}, {'end': 233.529, 'text': "We're grateful for the hard work of Mir Amir, Patrick Lewis, Nils Reimer and Sebastian Hofstadter from Cohere, as well as,", 'start': 223.661, 'duration': 9.868}], 'summary': "Dense retrieval with embeddings improves llm's question-string capabilities, thanks to contributions from mir amir, patrick lewis, nils reimer, and sebastian hofstadter from cohere.", 'duration': 32.705, 'max_score': 200.824, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k200824.jpg'}], 'start': 0.169, 'title': 'Large language models for semantic search', 'summary': 'Discusses incorporating large language models (llms) into information search, offering more relevant search results based on semantics. instructors jay alamir and luis serrano will teach semantic search with llms, covering basic keyword search, re-rank method, dense retrieval with embeddings, and evaluating search algorithms. the use of llms to generate answers based on search results is also highlighted, improving question answering capabilities.', 'chapters': [{'end': 47.451, 'start': 0.169, 'title': 'Large language models for semantic search', 'summary': 'Discusses incorporating large language models (llms) into information search in applications, allowing users to ask questions and providing more relevant search results based on semantics.', 'duration': 47.282, 'highlights': ['Large language models (LLMs) can enhance information search in applications by allowing users to ask questions and providing more relevant search results based on semantics.', 'LLMs enable systems to search websites or databases to answer user questions, improving the overall search experience.', 'Before LLMs, keyword search was common for website search; however, LLMs now offer the capability to provide more advanced search functionalities.']}, {'end': 369.067, 'start': 47.771, 'title': 'Teaching semantic search with llms', 'summary': 'Introduces instructors jay alamir and luis serrano, who are experienced machine learning engineers and educators. they will be teaching semantic search with large language models, which includes basic keyword search, re-rank method, dense retrieval with embeddings, and evaluating search algorithms. the chapter also highlights the use of llms to generate answers based on search results, improving the question answering capabilities of llms.', 'duration': 321.296, 'highlights': ['Instructors Jay Alamir and Luis Serrano are experienced machine learning engineers and educators. Both instructors are experienced in machine learning and educational roles, bringing valuable expertise to the course.', 'Teaching semantic search with LLMs includes basic keyword search, re-rank method, and dense retrieval with embeddings. The course covers various methods of semantic search, including basic keyword search, re-rank method, and dense retrieval with embeddings, providing a comprehensive understanding of search techniques.', 'The chapter emphasizes the use of LLMs to generate answers based on search results. The instructors highlight the capability of LLMs to generate answers based on search results, showcasing the practical application of large language models in question answering.']}], 'duration': 368.898, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k169.jpg', 'highlights': ['LLMs enable systems to search websites or databases to answer user questions, improving the overall search experience.', 'Teaching semantic search with LLMs includes basic keyword search, re-rank method, and dense retrieval with embeddings.', 'The chapter emphasizes the use of LLMs to generate answers based on search results.']}, {'end': 896.538, 'segs': [{'end': 399.615, 'src': 'embed', 'start': 369.347, 'weight': 0, 'content': [{'end': 372.028, 'text': 'And it contains 10 million records.', 'start': 369.347, 'duration': 2.681}, {'end': 382.31, 'text': 'These are records from Wikipedia each cell each record row in this database is a passage is a paragraph from Wikipedia.', 'start': 372.768, 'duration': 9.542}, {'end': 392.973, 'text': 'These 10 million records are from 10 different languages, so 1 million of them are in English and the other 9 million are in different languages,', 'start': 383.211, 'duration': 9.762}, {'end': 399.615, 'text': "and we can choose and filter which language we want to query, and we'll see that later in this lab.", 'start': 392.973, 'duration': 6.642}], 'summary': 'Database contains 10m wikipedia records in 10 languages.', 'duration': 30.268, 'max_score': 369.347, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k369347.jpg'}, {'end': 651.976, 'src': 'embed', 'start': 560.31, 'weight': 1, 'content': [{'end': 566.636, 'text': 'Now, to do the keyword search part, Weeviate has us type with BM25.', 'start': 560.31, 'duration': 6.326}, {'end': 573.602, 'text': 'And BM25 is this keyword search or lexical search algorithm commonly used.', 'start': 566.876, 'duration': 6.726}, {'end': 579.567, 'text': 'And it scores the documents in the archive versus the query,', 'start': 574.122, 'duration': 5.445}, {'end': 587.214, 'text': 'based on a specific formula that looks at the count of the shared words between the query and each document.', 'start': 579.567, 'duration': 7.647}, {'end': 595.239, 'text': 'And the way we need to do this is to say query equals the query we will pass to you.', 'start': 587.714, 'duration': 7.525}, {'end': 602.023, 'text': 'And the query we need to add to this function, so it is a parameter here as well.', 'start': 596.64, 'duration': 5.383}, {'end': 616.833, 'text': 'A couple more lines we need to pass to Weaviate are with where, so we can have a where clause here.', 'start': 608.528, 'duration': 8.305}, {'end': 621.774, 'text': 'that is formatted in a specific way.', 'start': 619.833, 'duration': 1.941}, {'end': 635.778, 'text': 'So what we want to do here is limit this to only English results and results slang will be something we also add to this definition.', 'start': 622.614, 'duration': 13.164}, {'end': 645.672, 'text': "So let's say EN By default, we'll filter by the English language and only look at the English language articles.", 'start': 636.038, 'duration': 9.634}, {'end': 651.976, 'text': "So that's why we're adding it here as a default, but it's something we can change whenever we call the keyword search method.", 'start': 646.092, 'duration': 5.884}], 'summary': 'Weaviate uses bm25 for keyword search, scoring documents based on shared words count. english language filtering is added as a default.', 'duration': 91.666, 'max_score': 560.31, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k560310.jpg'}, {'end': 740.581, 'src': 'embed', 'start': 709.658, 'weight': 5, 'content': [{'end': 712.9, 'text': 'It goes and comes back and these are the search results that we have.', 'start': 709.658, 'duration': 3.242}, {'end': 724.196, 'text': "It's a lot of text will go through it but we can see that it's a list of dictionaries so let's define a function that prints it in maybe a better way.", 'start': 714.172, 'duration': 10.024}, {'end': 728.678, 'text': 'And this function can look like this print result.', 'start': 725.777, 'duration': 2.901}, {'end': 735.201, 'text': 'And with this we can say OK now print it and let me see exactly what the results were.', 'start': 730.219, 'duration': 4.982}, {'end': 740.581, 'text': 'So the first result that we got back is this is the text.', 'start': 736.758, 'duration': 3.823}], 'summary': 'Defining a function to print search results in a better way.', 'duration': 30.923, 'max_score': 709.658, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k709658.jpg'}, {'end': 790.353, 'src': 'embed', 'start': 764.055, 'weight': 6, 'content': [{'end': 768.038, 'text': 'So the Super Bowl could probably be a highly televised event.', 'start': 764.055, 'duration': 3.983}, {'end': 776.065, 'text': "And then there's another result here that kind of mentions the World Cup, but it's not exactly the World Cup result.", 'start': 768.859, 'duration': 7.206}, {'end': 781.128, 'text': 'With each of these, we see the URL of that article.', 'start': 777.486, 'duration': 3.642}, {'end': 784.27, 'text': 'We can click on it, and it will lead us to a Wikipedia page.', 'start': 781.168, 'duration': 3.102}, {'end': 790.353, 'text': 'You can try to edit this query so you can see what else is in this data set.', 'start': 784.91, 'duration': 5.443}], 'summary': 'The super bowl is a highly televised event, with mention of the world cup and wikipedia page links.', 'duration': 26.298, 'max_score': 764.055, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k764055.jpg'}, {'end': 905.041, 'src': 'embed', 'start': 876.611, 'weight': 7, 'content': [{'end': 881.133, 'text': 'And we did German here because some words might be shared.', 'start': 876.611, 'duration': 4.522}, {'end': 882.513, 'text': 'And we can see here some results.', 'start': 881.313, 'duration': 1.2}, {'end': 888.715, 'text': 'So this result for the most televised event is for Busta Rhymes, the musician.', 'start': 882.553, 'duration': 6.162}, {'end': 893.677, 'text': 'But you can see why it brought this as a result, right? Because the word event is here.', 'start': 888.775, 'duration': 4.902}, {'end': 896.538, 'text': 'And then the name of the album mentioned here is Event.', 'start': 894.417, 'duration': 2.121}, {'end': 905.041, 'text': "So the text here and the query that we have shared, they don't have to share all of the keywords, but at least some of them.", 'start': 899.059, 'duration': 5.982}], 'summary': "German text analysis: busta rhymes' event is most televised.", 'duration': 28.43, 'max_score': 876.611, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k876611.jpg'}], 'start': 369.347, 'title': 'Weaviate database keyword search', 'summary': 'Covers the use of a weaviet database containing 10 million records from wikipedia passages in 10 languages, with 1 million in english, explaining the process of keyword search and the bm25 algorithm used for scoring documents based on shared words with the query. it describes creating a keyword search function in weaviate where the query is passed as a parameter, with options to filter by language, specify the number of results, and print the response. the chapter also discusses querying a database to find the most televised event, with examples including super bowl and world cup, and utilizing language filters such as german for varied results.', 'chapters': [{'end': 587.214, 'start': 369.347, 'title': 'Weaviet database keyword search', 'summary': 'Covers the use of a weaviet database containing 10 million records from wikipedia passages in 10 languages, with 1 million in english. it explains the process of keyword search and the bm25 algorithm used for scoring documents based on shared words with the query.', 'duration': 217.867, 'highlights': ['The database contains 10 million records from Wikipedia passages in 10 different languages, with 1 million in English and 9 million in other languages. Quantifiable data: 10 million records, 1 million in English, 9 million in other languages.', 'Keyword search involves comparing the number of shared words between the query and the documents, with the BM25 algorithm used to score the documents based on shared words. Key point: Explanation of keyword search process and BM25 algorithm. Quantifiable data: Explanation of how keyword search works.', 'The BM25 algorithm scores documents in the archive based on a specific formula that looks at the count of shared words between the query and each document. Key point: Explanation of BM25 algorithm. Quantifiable data: BM25 algorithm used for scoring documents.']}, {'end': 735.201, 'start': 587.714, 'title': 'Keyword search function in weaviate', 'summary': 'Describes the process of creating a keyword search function in weaviate, where the query is passed as a parameter, with options to filter by language, specify the number of results, and print the response.', 'duration': 147.487, 'highlights': ['Creating a keyword search function in Weaviate Describes the process of building a keyword search function in Weaviate, which involves passing the query as a parameter and implementing filters for language and result limit.', 'Filtering by language and specifying result limit Explains the approach to limit search results to English language and set the default number of results to three, with the flexibility to change these parameters.', 'Printing the response Discusses the function to print the search results in a structured manner, enhancing the readability of the retrieved data.']}, {'end': 896.538, 'start': 736.758, 'title': 'Querying database for televised events', 'summary': 'Discusses querying a database to find the most televised event, with examples including super bowl and world cup, and utilizing language filters such as german for varied results.', 'duration': 159.78, 'highlights': ['The Super Bowl could probably be a highly televised event.', 'You can try to edit this query so you can see what else is in this data set.', 'You can look at how many views a Wikipedia page received to filter or sort.', "Using language filters like German can provide varied results, such as the example of Busta Rhymes being associated with the keyword 'event'."]}], 'duration': 527.191, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k369347.jpg', 'highlights': ['The database contains 10 million records from Wikipedia passages in 10 different languages, with 1 million in English and 9 million in other languages.', 'Keyword search involves comparing the number of shared words between the query and the documents, with the BM25 algorithm used to score the documents based on shared words.', 'The BM25 algorithm scores documents in the archive based on a specific formula that looks at the count of shared words between the query and each document.', 'Creating a keyword search function in Weaviate involves passing the query as a parameter and implementing filters for language and result limit.', 'Filtering by language and specifying result limit explains the approach to limit search results to English language and set the default number of results to three, with the flexibility to change these parameters.', 'Printing the response discusses the function to print the search results in a structured manner, enhancing the readability of the retrieved data.', 'The Super Bowl could probably be a highly televised event.', "Using language filters like German can provide varied results, such as the example of Busta Rhymes being associated with the keyword 'event'."]}, {'end': 1877.197, 'segs': [{'end': 1139.063, 'src': 'embed', 'start': 1110.314, 'weight': 0, 'content': [{'end': 1115.017, 'text': "And then we'll look at how re-ranking works and how it can improve the second stage.", 'start': 1110.314, 'duration': 4.703}, {'end': 1124.524, 'text': "And at the end of this course, we'll look at how large language models can generate responses as informed by a search step that happens beforehand.", 'start': 1116.138, 'duration': 8.386}, {'end': 1127.959, 'text': "So let's go to the next lesson and learn about embeddings.", 'start': 1125.478, 'duration': 2.481}, {'end': 1131.3, 'text': 'Welcome to lesson two.', 'start': 1130.5, 'duration': 0.8}, {'end': 1133.601, 'text': 'In this lesson, you will learn embeddings.', 'start': 1131.94, 'duration': 1.661}, {'end': 1139.063, 'text': 'Embeddings are numerical representations of text that computers can more easily process.', 'start': 1134.181, 'duration': 4.882}], 'summary': 'The course covers re-ranking, language models, and embeddings for text processing.', 'duration': 28.749, 'max_score': 1110.314, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k1110314.jpg'}, {'end': 1235.288, 'src': 'embed', 'start': 1210.499, 'weight': 1, 'content': [{'end': 1220.611, 'text': 'Over here, we have a grid with a horizontal and a vertical axis and coordinates, and we have a bunch of words located in this grid, as you can see.', 'start': 1210.499, 'duration': 10.112}, {'end': 1228.9, 'text': 'Given the locations of these words, where would you put the word apple? As you can see in this embedding, similar words are grouped together.', 'start': 1221.171, 'duration': 7.729}, {'end': 1235.288, 'text': 'So in the top left you have sports, in the bottom left you have houses and buildings and castles.', 'start': 1229.341, 'duration': 5.947}], 'summary': 'Grid with words grouped by similarity; word apple placement queried.', 'duration': 24.789, 'max_score': 1210.499, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k1210499.jpg'}, {'end': 1877.197, 'src': 'embed', 'start': 1850.957, 'weight': 2, 'content': [{'end': 1857.341, 'text': 'And that is dense retrieval, one of the two main ways of doing semantic search, the other one being re-rankers.', 'start': 1850.957, 'duration': 6.384}, {'end': 1861.95, 'text': "So let's look at how to do dense retrieval with Weeviate.", 'start': 1858.829, 'duration': 3.121}, {'end': 1863.531, 'text': 'This is the code.', 'start': 1862.571, 'duration': 0.96}, {'end': 1866.933, 'text': "It will be very familiar to you if you've gone through lesson one.", 'start': 1863.591, 'duration': 3.342}, {'end': 1871.194, 'text': 'This is Weeviate API calls.', 'start': 1867.413, 'duration': 3.781}, {'end': 1877.197, 'text': "The main difference here is that instead of using BM25, we're saying with near text.", 'start': 1871.355, 'duration': 5.842}], 'summary': "Dense retrieval is one of two main ways of semantic search, using weeviate api calls with 'near text' instead of bm25.", 'duration': 26.24, 'max_score': 1850.957, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k1850957.jpg'}], 'start': 899.059, 'title': 'Improving search with language models, word embeddings, and dense retrieval', 'summary': 'Covers the use of bm25 algorithm, limitations of keyword search, and potential of language models, along with word embeddings, data visualization, and dense retrieval for semantic search. it includes creating and visualizing embeddings for words and sentences, and illustrates dense retrieval using embeddings to search for answers in a large database.', 'chapters': [{'end': 1210.039, 'start': 899.059, 'title': 'Improving search with language models', 'summary': 'Discusses the use of bm25 algorithm for search, limitations of keyword search, and the potential of language models to improve both search stages, with a focus on embeddings in lesson two.', 'duration': 310.98, 'highlights': ['Language models can improve both search stages, with a focus on embeddings in lesson two. Language models are discussed as a potential solution to the limitations of keyword search, with a focus on how embeddings can improve the retrieval or first stage and re-ranking in the second stage.', 'Explanation of embeddings and their role in large language models. Embeddings are described as numerical representations of text that computers can more easily process, and they are highlighted as one of the most important components of large language models.', 'Overview of keyword search and limitations in retrieving documents with different keywords. The limitations of keyword search are explained using an example where a document with different keywords cannot be retrieved, highlighting the need for language models to address this issue.']}, {'end': 1582.674, 'start': 1210.499, 'title': 'Word embeddings and data visualization', 'summary': 'Explains the concept of word embeddings, which map words to vectors, and demonstrates how to create and visualize embeddings for words and sentences using the pandas and cohere packages, with an example of an embedding plot showing the proximity of similar sentences.', 'duration': 372.175, 'highlights': ['Words are embedded as vectors, with the example of the word apple being associated with the coordinates (5, 5) among other grouped words like sports, houses, buildings, castles, vehicles, and fruits. The word apple is embedded among grouped words, with its coordinates being (5, 5) among sports, houses, buildings, castles, vehicles, and fruits.', 'The embeddings for words are created using the cohere function embed, with the dataset containing three words: joy, happiness, and potato, and the embeddings are extracted, with each word being associated with a vector. Embeddings for words like joy, happiness, and potato are created using the cohere function embed, and each word is associated with a vector.', 'Sentences are also embedded as vectors, and the example of using the embed function to create embeddings for a dataset of eight sentences is demonstrated, followed by visualizing the embeddings to show the proximity of similar sentences. The process of creating embeddings for sentences is illustrated, along with visualizing the embeddings to demonstrate the proximity of similar sentences.']}, {'end': 1877.197, 'start': 1583.354, 'title': 'Dense retrieval for semantic search', 'summary': 'Discusses dense retrieval for semantic search, using embeddings to search for answers in a large database, and how similar sentences are close to each other in the embedding space, leading to dense retrieval.', 'duration': 293.843, 'highlights': ['The chapter discusses dense retrieval for semantic search. The chapter explains the concept of dense retrieval for semantic search, which involves using embeddings to search for answers in a large database.', 'Using embeddings to search for answers in a large database. The method involves using embeddings to search for answers in a large data set, with an example of working with a big data set of Wikipedia articles containing 2000 articles.', 'How similar sentences are close to each other in the embedding space, leading to dense retrieval. The chapter explains how similar sentences are close to each other in the embedding space, and how this property is utilized for dense retrieval, where sentences with similar meanings are close to each other in the plot.']}], 'duration': 978.138, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k899059.jpg', 'highlights': ['Language models can improve both search stages, with a focus on embeddings in lesson two.', 'Words are embedded as vectors, with the example of the word apple being associated with the coordinates (5, 5) among other grouped words like sports, houses, buildings, castles, vehicles, and fruits.', 'The chapter discusses dense retrieval for semantic search.']}, {'end': 2223.375, 'segs': [{'end': 1927.081, 'src': 'embed', 'start': 1878.098, 'weight': 0, 'content': [{'end': 1880.559, 'text': 'Near text here we pass the query to.', 'start': 1878.098, 'duration': 2.461}, {'end': 1884.14, 'text': 'So we put the query in this Python dictionary.', 'start': 1880.699, 'duration': 3.441}, {'end': 1892.806, 'text': 'We call it near text and then we throw that variable at the query and then that is how we get the response back.', 'start': 1884.7, 'duration': 8.106}, {'end': 1898.792, 'text': 'so this is how we V8 does vector search instead of pm25 keyword search.', 'start': 1892.806, 'duration': 5.986}, {'end': 1903.236, 'text': 'once we execute this, we can start to send queries and see the results.', 'start': 1898.792, 'duration': 4.444}, {'end': 1908.581, 'text': 'so let us now run a few queries and see what the database sends back.', 'start': 1903.236, 'duration': 5.345}, {'end': 1910.443, 'text': "so let's say we have this query.", 'start': 1908.581, 'duration': 1.862}, {'end': 1912.465, 'text': 'who wrote Hamlet?', 'start': 1910.443, 'duration': 2.022}, {'end': 1916.754, 'text': 'we can run it, and So this is the first result.', 'start': 1912.465, 'duration': 4.289}, {'end': 1927.081, 'text': 'what happened here is that the embedding of all of this text was matched against the query, and this is the text that is most similar to this query,', 'start': 1916.754, 'duration': 10.327}], 'summary': 'Using v8 for vector search, queries return most similar text based on embeddings.', 'duration': 48.983, 'max_score': 1878.098, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k1878098.jpg'}, {'end': 2110.582, 'src': 'embed', 'start': 2081.658, 'weight': 1, 'content': [{'end': 2087.801, 'text': 'And so this is another example where dense retrieval really was able to capture the intent of the query and return the best result for it.', 'start': 2081.658, 'duration': 6.143}, {'end': 2094.134, 'text': 'Another thing to showcase here where dense retrieval really helps with is multilingual.', 'start': 2089.411, 'duration': 4.723}, {'end': 2097.897, 'text': 'So this is how you can support search in multiple languages.', 'start': 2094.714, 'duration': 3.183}, {'end': 2103.6, 'text': "So let's say we have this same query from before, but let's say we write it in a different language.", 'start': 2098.257, 'duration': 5.343}, {'end': 2110.582, 'text': 'the model that we have been using for embeddings here is a multilingual model.', 'start': 2105.061, 'duration': 5.521}], 'summary': 'Dense retrieval captures query intent, supports multilingual search with a multilingual model.', 'duration': 28.924, 'max_score': 2081.658, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k2081658.jpg'}, {'end': 2223.375, 'src': 'embed', 'start': 2182.169, 'weight': 4, 'content': [{'end': 2187.573, 'text': 'you can change the queries and look for various pages inside of Wikipedia using semantic search.', 'start': 2182.169, 'duration': 5.404}, {'end': 2193.857, 'text': 'And that is the end of part one, where we were just consuming a vector database.', 'start': 2188.693, 'duration': 5.164}, {'end': 2199.361, 'text': "let's now start with part two, where we actually build our own vector search database.", 'start': 2193.857, 'duration': 5.504}, {'end': 2202.764, 'text': "Let's start by importing some of the libraries we'll need.", 'start': 2200.543, 'duration': 2.221}, {'end': 2209.768, 'text': 'The main one here is this library called Annoy, which is a nearest neighbor library.', 'start': 2203.625, 'duration': 6.143}, {'end': 2212.909, 'text': "It's kind of similar to Weaviate, but it's a little simpler.", 'start': 2210.368, 'duration': 2.541}, {'end': 2218.512, 'text': "We'll talk about the difference between nearest neighbor libraries and vector databases.", 'start': 2213.43, 'duration': 5.082}, {'end': 2223.375, 'text': "And then we'll import a few of Python's famous libraries.", 'start': 2219.253, 'duration': 4.122}], 'summary': 'Using annoy library, we build a vector search database with python libraries.', 'duration': 41.206, 'max_score': 2182.169, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k2182169.jpg'}], 'start': 1878.098, 'title': 'V8 vector search and dense retrieval', 'summary': "Explains v8's vector search method for matching queries with similar text, providing relevant results and distance number indication. it also explores dense retrieval's effectiveness, multilingual capabilities, and potential for building a vector search database.", 'chapters': [{'end': 1953.299, 'start': 1878.098, 'title': 'V8 vector search', 'summary': "Explains v8's vector search method, which matches the query with the most similar text in the archive, such as finding the author of hamlet, with relevant results returned, and a distance number indicating proximity.", 'duration': 75.201, 'highlights': ['V8 uses vector search instead of pm25 keyword search to match the query with the most similar text in the archive, as demonstrated by finding the author of Hamlet with relevant results returned.', 'The distance number returned by V8 indicates the proximity of the query to the matched text, providing a quantifiable measure of similarity.', "Executing the mentioned Python dictionary with the query initiates the process of obtaining a response from V8's vector search."]}, {'end': 2223.375, 'start': 1955.464, 'title': 'Dense retrieval and multilingual search', 'summary': 'Explores the effectiveness of keyword search versus dense retrieval in providing relevant results, with an emphasis on multilingual capabilities and the ability to capture query intent. it also highlights the potential for exploration and the transition to building a vector search database.', 'duration': 267.911, 'highlights': ['Dense retrieval provides more relevant results compared to keyword search, as demonstrated by the example of finding the capital of Canada and the tallest person in history. Dense retrieval returns relevant results, such as the capital of Canada and the tallest person in history (Robert Wadlow), while keyword search yields less relevant information, showcasing the effectiveness of dense retrieval.', 'The multilingual capabilities of dense retrieval enable search in different languages, as demonstrated by matching queries in German and Arabic with results in other languages. The multilingual model used for embeddings allows matching queries in different languages with results in any language, as showcased by matching a query in German and Arabic with relevant results, highlighting the multilingual capabilities of dense retrieval.', 'Exploration using semantic search allows for the discovery of relevant information and data sets, promoting a deeper understanding and engagement with the search results. The ability to explore and discover relevant information and data sets using semantic search, such as finding films related to time travel paradox, promotes deeper engagement and understanding of the search results, encouraging exploration and discovery.', 'Transitioning to building a vector search database involves importing necessary libraries, including Annoy for nearest neighbor search, and discussing the differences between nearest neighbor libraries and vector databases. The chapter transitions to building a vector search database, involving the import of necessary libraries such as Annoy for nearest neighbor search and discussions on the differences between nearest neighbor libraries and vector databases, signaling the shift towards database construction.']}], 'duration': 345.277, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k1878098.jpg', 'highlights': ['V8 uses vector search for matching queries with similar text, demonstrated by finding the author of Hamlet with relevant results.', 'Dense retrieval provides more relevant results compared to keyword search, as demonstrated by finding the capital of Canada and the tallest person in history.', 'The distance number returned by V8 indicates the proximity of the query to the matched text, providing a quantifiable measure of similarity.', 'The multilingual capabilities of dense retrieval enable search in different languages, as demonstrated by matching queries in German and Arabic with results in other languages.', 'Exploration using semantic search allows for the discovery of relevant information and data sets, promoting a deeper understanding and engagement with the search results.', 'Transitioning to building a vector search database involves importing necessary libraries, including Annoy for nearest neighbor search, and discussing the differences between nearest neighbor libraries and vector databases.']}, {'end': 2633.648, 'segs': [{'end': 2329.323, 'src': 'embed', 'start': 2248.565, 'weight': 0, 'content': [{'end': 2252.089, 'text': 'So we need to break this text down into chunks.', 'start': 2248.565, 'duration': 3.524}, {'end': 2254.511, 'text': 'But how big are these chunks?', 'start': 2253.11, 'duration': 1.401}, {'end': 2261.718, 'text': 'Do we split it into sentences or do we split it into paragraphs, or what is the best way to chunk it?', 'start': 2254.811, 'duration': 6.907}, {'end': 2265.882, 'text': "And this is a question that is commonly asked, and it's really.", 'start': 2261.838, 'duration': 4.044}, {'end': 2268.344, 'text': 'the answer is different for every task.', 'start': 2265.882, 'duration': 2.462}, {'end': 2272.547, 'text': "A couple of the common ways is to split, let's say, at every dot.", 'start': 2268.865, 'duration': 3.682}, {'end': 2274.868, 'text': 'So we know this text is very clean.', 'start': 2272.587, 'duration': 2.281}, {'end': 2277.709, 'text': 'All the sentences are separated by periods.', 'start': 2275.328, 'duration': 2.381}, {'end': 2279.71, 'text': 'So we can split on the period.', 'start': 2277.789, 'duration': 1.921}, {'end': 2287.214, 'text': "But in real life, if you're dealing with a lot of noisy text, you might need to process it a little bit beforehand.", 'start': 2280.351, 'duration': 6.863}, {'end': 2298.202, 'text': 'And then you might also be needing to use libraries that actually split at various sentences in more complicated or advanced ways than just splitting at the period.', 'start': 2287.254, 'duration': 10.948}, {'end': 2301.825, 'text': "So this is one option and let's see what happens if we execute it.", 'start': 2298.282, 'duration': 3.543}, {'end': 2311.015, 'text': 'So what are the texts here now? So we can see that every sentence is a string inside of this list.', 'start': 2301.925, 'duration': 9.09}, {'end': 2316.08, 'text': 'And so this is a one way of chunking where every sentence is a list.', 'start': 2311.335, 'duration': 4.745}, {'end': 2329.323, 'text': "Now the way that the actual data set the open source data set that we've been working with is it's actually split on paragraphs so we're not doing.", 'start': 2317.777, 'duration': 11.546}], 'summary': 'Chunking text can be done by splitting at periods or paragraphs, depending on the data set and the noise level.', 'duration': 80.758, 'max_score': 2248.565, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k2248565.jpg'}, {'end': 2460.271, 'src': 'embed', 'start': 2431.216, 'weight': 1, 'content': [{'end': 2436.697, 'text': 'to recap a little bit of what we looked at with chunking, we have a Wikipedia page.', 'start': 2431.216, 'duration': 5.481}, {'end': 2445.74, 'text': 'we can break it down into paragraphs or into sentences and then we embed each one of these will go through the code to do that next.', 'start': 2436.697, 'duration': 9.043}, {'end': 2451.09, 'text': 'So each one of these has its own embeddings vector.', 'start': 2446.929, 'duration': 4.161}, {'end': 2460.271, 'text': 'And then once we have our query we embed that query and then the search is just finding the nearest.', 'start': 2454.025, 'duration': 6.246}], 'summary': 'Chunking involves breaking down wikipedia page into paragraphs or sentences, each with its own embeddings vector.', 'duration': 29.055, 'max_score': 2431.216, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k2431216.jpg'}, {'end': 2610.437, 'src': 'embed', 'start': 2581.039, 'weight': 3, 'content': [{'end': 2585.121, 'text': "Let's now define the basic search function.", 'start': 2581.039, 'duration': 4.082}, {'end': 2586.702, 'text': "Here's what it does.", 'start': 2586.081, 'duration': 0.621}, {'end': 2588.103, 'text': "We'll send it a query.", 'start': 2587.282, 'duration': 0.821}, {'end': 2598.272, 'text': 'It will embed that query so it sends it to the language model and gets back a embedding for the query that embedding is then sent to the.', 'start': 2589.048, 'duration': 9.224}, {'end': 2607.916, 'text': 'Factor search index, and then we get the top three results, so the nearest three neighbors to this query,', 'start': 2599.372, 'duration': 8.544}, {'end': 2610.437, 'text': 'and then here we just format them and print them.', 'start': 2607.916, 'duration': 2.521}], 'summary': 'Defines basic search function, sends query to model, gets top 3 results.', 'duration': 29.398, 'max_score': 2581.039, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k2581039.jpg'}], 'start': 2225.37, 'title': 'Text processing techniques for semantic search', 'summary': 'Discusses chunking text for semantic search, including considerations for splitting text, and text embedding and vector search, demonstrating the process of chunking a wikipedia page, embedding the chunks, building a search index, and defining a basic search function.', 'chapters': [{'end': 2362.63, 'start': 2225.37, 'title': 'Chunking text for semantic search', 'summary': 'Discusses the process of chunking text for semantic search, including considerations for splitting text into sentences or paragraphs and the importance of using libraries for processing noisy text.', 'duration': 137.26, 'highlights': ['The chapter discusses the process of chunking text for semantic search, including considerations for splitting text into sentences or paragraphs and the importance of using libraries for processing noisy text.', 'The text can be split into chunks such as sentences or paragraphs, with the decision depending on the specific task or use case.', 'In real life, when dealing with noisy text, additional preprocessing may be required before splitting the text into chunks, and libraries may be needed for more advanced methods of chunking.', 'The open source dataset being worked with is split on paragraphs, with each chunk representing a whole paragraph, although the appropriate chunking method depends on the specific use case.']}, {'end': 2633.648, 'start': 2362.81, 'title': 'Text embedding and vector search', 'summary': 'Introduces the concept of text embedding and vector search, demonstrating the process of chunking a wikipedia page, embedding the chunks, building a search index, and defining a basic search function, with a focus on using these techniques to find relevant information within documents.', 'duration': 270.838, 'highlights': ['The chapter explains the process of chunking a Wikipedia page into paragraphs or sentences and embedding each chunk to create vectors representing the meaning of the text, with each sentence being represented by a 4000-number vector.', 'It outlines the process of building a search index by iterating over the embeddings of the text chunks, inserting them into the index, and then saving the index to file to disk, ready to send queries and retrieve the nearest results.', 'The chapter demonstrates a basic search function that embeds a query, sends it to the vector search index, retrieves the top three nearest neighbors to the query, and formats and prints the results, showcasing the capability to find relevant information within the documents.']}], 'duration': 408.278, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k2225370.jpg', 'highlights': ['The chapter discusses the process of chunking text for semantic search, including considerations for splitting text into sentences or paragraphs and the importance of using libraries for processing noisy text.', 'The chapter explains the process of chunking a Wikipedia page into paragraphs or sentences and embedding each chunk to create vectors representing the meaning of the text, with each sentence being represented by a 4000-number vector.', 'It outlines the process of building a search index by iterating over the embeddings of the text chunks, inserting them into the index, and then saving the index to file to disk, ready to send queries and retrieve the nearest results.', 'The chapter demonstrates a basic search function that embeds a query, sends it to the vector search index, retrieves the top three nearest neighbors to the query, and formats and prints the results, showcasing the capability to find relevant information within the documents.', 'The text can be split into chunks such as sentences or paragraphs, with the decision depending on the specific task or use case.', 'In real life, when dealing with noisy text, additional preprocessing may be required before splitting the text into chunks, and libraries may be needed for more advanced methods of chunking.', 'The open source dataset being worked with is split on paragraphs, with each chunk representing a whole paragraph, although the appropriate chunking method depends on the specific use case.']}, {'end': 2970.248, 'segs': [{'end': 2714.489, 'src': 'embed', 'start': 2688.028, 'weight': 0, 'content': [{'end': 2692.67, 'text': 'but we have a lot of really highly optimized algorithms that can get you the approximate nearest neighbor.', 'start': 2688.028, 'duration': 4.642}, {'end': 2695.952, 'text': "And that's why they're called ANN or approximate nearest neighbors.", 'start': 2692.75, 'duration': 3.202}, {'end': 2701.884, 'text': 'We talked about the Annoy library, but there are a bunch of other ones that are also open source.', 'start': 2697.222, 'duration': 4.662}, {'end': 2703.545, 'text': 'So Annoy is from Spotify.', 'start': 2701.944, 'duration': 1.601}, {'end': 2714.489, 'text': 'Feist is another popular one from Facebook and Scan from Google are all choices for approximate nearest neighbor vector search libraries.', 'start': 2704.065, 'duration': 10.424}], 'summary': 'Highly optimized algorithms like annoy, feist, and scan provide approximate nearest neighbor vector search.', 'duration': 26.461, 'max_score': 2688.028, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k2688028.jpg'}, {'end': 2777.766, 'src': 'embed', 'start': 2752.709, 'weight': 2, 'content': [{'end': 2760.652, 'text': 'so you saw how annoying setting it up and installing it is maybe a little easier than the than the other choices.', 'start': 2752.709, 'duration': 7.943}, {'end': 2766.036, 'text': "These vector search libraries also tend to only store the vectors, so they don't store the text.", 'start': 2761.272, 'duration': 4.764}, {'end': 2770.26, 'text': 'With the Weaviate example, you saw that we gave it a search query.', 'start': 2766.717, 'duration': 3.543}, {'end': 2772.342, 'text': 'It returned to us the text.', 'start': 2770.38, 'duration': 1.962}, {'end': 2777.766, 'text': 'So it manages that, and it stores the text, and it is able to retrieve the text that we want.', 'start': 2772.542, 'duration': 5.224}], 'summary': 'Weaviate makes setting up and installing vector search libraries easier, and it effectively stores and retrieves text.', 'duration': 25.057, 'max_score': 2752.709, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k2752709.jpg'}, {'end': 2832.853, 'src': 'embed', 'start': 2787.631, 'weight': 1, 'content': [{'end': 2796.213, 'text': "So, if you want to add new records or modify records, if you're using a library, you need to rebuild your index, while if you're using a database,", 'start': 2787.631, 'duration': 8.582}, {'end': 2797.693, 'text': 'the database handles that for you.', 'start': 2796.213, 'duration': 1.48}, {'end': 2806.215, 'text': 'Vector databases also allow us to filter and do more advanced queries, kind of like what we saw by filtering by the language.', 'start': 2798.573, 'duration': 7.642}, {'end': 2810.536, 'text': 'These are all useful things that vector databases allow us to do.', 'start': 2807.355, 'duration': 3.181}, {'end': 2816.687, 'text': "Now, in the real world, you don't need to really replace keyword search completely with vector search.", 'start': 2811.465, 'duration': 5.222}, {'end': 2818.388, 'text': 'They complement each other.', 'start': 2817.287, 'duration': 1.101}, {'end': 2822.769, 'text': 'You can use them both together in the same pipeline as hybrid search.', 'start': 2818.748, 'duration': 4.021}, {'end': 2829.131, 'text': 'What that entails is that when you get a query, you do keyword search and vector search on it at the same time.', 'start': 2823.329, 'duration': 5.802}, {'end': 2832.853, 'text': 'And you can see how a language model is going to power the vector search component.', 'start': 2829.291, 'duration': 3.562}], 'summary': 'Vector databases enable advanced queries, complementing keyword search in a hybrid pipeline.', 'duration': 45.222, 'max_score': 2787.631, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k2787631.jpg'}, {'end': 2901.845, 'src': 'embed', 'start': 2876.573, 'weight': 4, 'content': [{'end': 2882.918, 'text': 'So this is just how you can encompass text relevance with other signals by this aggregation step.', 'start': 2876.573, 'duration': 6.345}, {'end': 2894.867, 'text': "In the next lesson you'll see how re-ranking fits in after the search step and how it can vastly improve this ranking and the relevance of the query to the search results.", 'start': 2883.558, 'duration': 11.309}, {'end': 2901.845, 'text': 'If you want to learn more about the history of dense retrieval in the last few years, this is a really good resource.', 'start': 2895.717, 'duration': 6.128}], 'summary': 'Aggregation improves text relevance. re-ranking enhances search results.', 'duration': 25.272, 'max_score': 2876.573, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k2876573.jpg'}], 'start': 2634.248, 'title': 'Dense retrieval and vector search', 'summary': 'Discusses dense retrieval and vector search using tools like annoy for approximate nearest neighbor algorithms, differences between vector search libraries and databases, and the process of semantic search and re-ranking for potential improvement in ranking and relevance.', 'chapters': [{'end': 2703.545, 'start': 2634.248, 'title': 'Dense retrieval and vector search tools', 'summary': 'Discusses dense retrieval and vector search using tools like annoy, with approximate nearest neighbor algorithms to optimize for speed and finding approximate nearest neighbors, such as annoy library from spotify.', 'duration': 69.297, 'highlights': ['Dense retrieval involves finding the nearest neighbors to a search query and is optimized for speed using approximate nearest neighbor algorithms.', 'Annoy, an open source library from Spotify, is a tool for approximate nearest neighbor vector search.', 'Exact nearest neighbor search is computationally taxing, but approximate nearest neighbor algorithms like Annoy are highly optimized for efficiency.']}, {'end': 2832.853, 'start': 2704.065, 'title': 'Vector search libraries vs. vector databases', 'summary': 'Discusses the differences between approximate nearest neighbor vector search libraries and vector databases, highlighting the ease of setup, storage of text, update process, and complementarity with keyword search.', 'duration': 128.788, 'highlights': ['Vector databases are easier to update compared to vector search libraries. Vector databases allow for easier addition and modification of records without requiring the rebuilding of the index, providing a more streamlined update process.', 'Vector search libraries tend to be simpler to set up and install than vector databases. Approximate nearest neighbor vector search libraries are comparatively easier to set up and install, offering a more straightforward implementation process.', 'Vector search libraries only store vectors, while vector databases can store and retrieve text. Vector search libraries solely store vectors, whereas vector databases are capable of storing and retrieving text, providing a more feature-rich functionality.', 'Hybrid search involves using both keyword search and vector search together in the same pipeline. In the real world, keyword search and vector search complement each other and can be used together in the same pipeline, known as hybrid search.']}, {'end': 2970.248, 'start': 2833.573, 'title': 'Semantic search and re-ranking', 'summary': 'Discusses the process of dense retrieval and re-ranking in semantic search, including the aggregation of scores from various signals and the potential improvement in ranking and relevance using re-ranking, with a recommendation for further reading on the topic.', 'duration': 136.675, 'highlights': ['The process of dense retrieval involves assigning a score to each document in the text archive and aggregating these scores to present the best search results, leveraging various signals including PageRank algorithm and other additional signals from search engines.', 'Re-ranking is a method to improve keyword search and dense retrieval by sorting search results based on their relevance to the query, and it serves as the second component of semantic search in addition to dense retrieval.', "A recommendation is made for further reading on the development of semantic search models, specifically mentioning the book and paper 'Pre-trained Transformers for Text Ranking BERT and Beyond' as a valuable resource for those interested in the topic."]}], 'duration': 336, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k2634248.jpg', 'highlights': ['Annoy, an open source library from Spotify, is a tool for approximate nearest neighbor vector search.', 'Vector databases allow for easier addition and modification of records without requiring the rebuilding of the index.', 'Vector search libraries tend to be simpler to set up and install than vector databases.', 'Hybrid search involves using both keyword search and vector search together in the same pipeline.', 'The process of dense retrieval involves assigning a score to each document in the text archive and aggregating these scores to present the best search results.']}, {'end': 3409.442, 'segs': [{'end': 3002.056, 'src': 'embed', 'start': 2971.389, 'weight': 1, 'content': [{'end': 2977.414, 'text': "Next step, we are going to create our client that's going to store all the Wikipedia entries.", 'start': 2971.389, 'duration': 6.025}, {'end': 2982.799, 'text': "Now let's perform a search using dense retrieval, what you learned in the previous lesson.", 'start': 2978.135, 'duration': 4.664}, {'end': 2985.361, 'text': "We're going to import the dense retrieval function.", 'start': 2983.319, 'duration': 2.042}, {'end': 2992.789, 'text': "Now let's search for the following query.", 'start': 2990.427, 'duration': 2.362}, {'end': 3002.056, 'text': "What is the capital of Canada? We're going to call the answer dense retrieval results.", 'start': 2994.15, 'duration': 7.906}], 'summary': "Creating a client to store wikipedia entries, performing a search using dense retrieval, and calling the answer dense retrieval results for the query 'what is the capital of canada?'", 'duration': 30.667, 'max_score': 2971.389, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k2971389.jpg'}, {'end': 3096.039, 'src': 'embed', 'start': 3070.475, 'weight': 0, 'content': [{'end': 3076.298, 'text': 'And then a sentence says the capital of Ontario is Toronto, which is true, but also not answering the questions.', 'start': 3070.475, 'duration': 5.823}, {'end': 3083.001, 'text': "What happens when we do dense retrieval here? Well, let's say that these sentences are here.", 'start': 3076.958, 'duration': 6.043}, {'end': 3084.402, 'text': 'The capital of Canada is Ottawa.', 'start': 3083.041, 'duration': 1.361}, {'end': 3086.143, 'text': 'Toronto is in Canada.', 'start': 3085.042, 'duration': 1.101}, {'end': 3091.997, 'text': 'The capital of France is Paris, the capital of Canada is Sydney, and the capital of Ontario is Toronto.', 'start': 3086.974, 'duration': 5.023}, {'end': 3096.039, 'text': "So in an embedding, let's just imagine that they're located over here.", 'start': 3092.037, 'duration': 4.002}], 'summary': 'Transcript discusses dense retrieval and provides examples of sentence embeddings.', 'duration': 25.564, 'max_score': 3070.475, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k3070475.jpg'}, {'end': 3146.507, 'src': 'embed', 'start': 3116.391, 'weight': 5, 'content': [{'end': 3117.832, 'text': 'This may not be the correct answer.', 'start': 3116.391, 'duration': 1.441}, {'end': 3120.353, 'text': 'This may not even be a true statement.', 'start': 3118.132, 'duration': 2.221}, {'end': 3125.135, 'text': "It's just a sentence that happens to be close to the question semantically.", 'start': 3120.793, 'duration': 4.342}, {'end': 3131.877, 'text': 'So therefore, dense retrieval has the potential to return things that are not necessarily the answer.', 'start': 3125.575, 'duration': 6.302}, {'end': 3137.119, 'text': 'How do we fix this? Well, this is where re-rank comes into play.', 'start': 3132.777, 'duration': 4.342}, {'end': 3140.682, 'text': 'Now let me show you a small example of re-rank.', 'start': 3137.86, 'duration': 2.822}, {'end': 3146.507, 'text': "Let's say that the query is, what is the capital of Canada? And we have 10 possible answers.", 'start': 3141.062, 'duration': 5.445}], 'summary': 'Dense retrieval may not always return correct answers; re-rank is a solution.', 'duration': 30.116, 'max_score': 3116.391, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k3116391.jpg'}, {'end': 3259.505, 'src': 'embed', 'start': 3232.254, 'weight': 3, 'content': [{'end': 3240.037, 'text': 'and if you train a model to give high scores to the good query response pairs and low scores to the bad query response pairs,', 'start': 3232.254, 'duration': 7.783}, {'end': 3248.8, 'text': 'then you have the re-rank model that assigns a relevance and the relevance is high when you have a query and a response that are very related.', 'start': 3240.037, 'duration': 8.763}, {'end': 3251.762, 'text': "Now let's look at more re-rank examples.", 'start': 3249.581, 'duration': 2.181}, {'end': 3254.063, 'text': "Let's use it to improve keyword search.", 'start': 3252.102, 'duration': 1.961}, {'end': 3259.505, 'text': "So we're gonna import that keyword search function that we used in the first lesson.", 'start': 3254.283, 'duration': 5.222}], 'summary': 'Training a model assigns relevance to related query-response pairs, improving keyword search.', 'duration': 27.251, 'max_score': 3232.254, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k3232254.jpg'}, {'end': 3391.114, 'src': 'embed', 'start': 3361.442, 'weight': 4, 'content': [{'end': 3365.805, 'text': 'And this one has a relevance score of 0.97.', 'start': 3361.442, 'duration': 4.363}, {'end': 3368.106, 'text': "And as you can see, the third one's also pretty good.", 'start': 3365.805, 'duration': 2.301}, {'end': 3376.852, 'text': 'And ReRanked actually picked the top 10 answers among the ones that keyword search surfaced that has the highest relevance.', 'start': 3368.546, 'duration': 8.306}, {'end': 3381.538, 'text': "And now let's do a final example using dense retrieval.", 'start': 3377.612, 'duration': 3.926}, {'end': 3386.546, 'text': "So again, I'm going to use this dense retrieval function and let's give it a slightly hard question.", 'start': 3381.599, 'duration': 4.947}, {'end': 3391.114, 'text': "Let's give it the question who is the tallest person in history?", 'start': 3386.947, 'duration': 4.167}], 'summary': 'Reranked picked top 10 answers with 0.97 relevance score using dense retrieval.', 'duration': 29.672, 'max_score': 3361.442, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k3361442.jpg'}], 'start': 2971.389, 'title': 'Wikipedia and nlp dense retrieval', 'summary': 'Covers creating a wikipedia client, performing a dense retrieval search to find the capital of canada (ottawa). it also discusses the working, limitations, and training process of dense retrieval, the role of re-rank in assigning relevance scores, and its use in improving keyword search.', 'chapters': [{'end': 3033.49, 'start': 2971.389, 'title': 'Wikipedia dense retrieval search', 'summary': 'Covers the creation of a wikipedia client, performing a search using dense retrieval to find the capital of canada, and printing the correct result, which is ottawa.', 'duration': 62.101, 'highlights': ["The first result of the dense retrieval search for 'What is the capital of Canada?' is Ottawa.", 'The chapter demonstrates the use of a dense retrieval function to search for the capital of Canada.', 'The process involves creating a client to store Wikipedia entries and importing the dense retrieval function.']}, {'end': 3409.442, 'start': 3033.49, 'title': 'Rerank and dense retrieval in nlp', 'summary': 'Discusses how dense retrieval works, its potential to return irrelevant responses, the role of re-rank in assigning relevance scores to query-response pairs, and its training process. it also demonstrates the use of re-rank to improve keyword search and the limitations of keyword search in finding relevant answers.', 'duration': 375.952, 'highlights': ['The chapter discusses how dense retrieval works and its potential to return irrelevant responses. Dense retrieval uses embeddings to find the most similar response to a query, potentially returning semantically close but incorrect answers.', 'The role of re-rank in assigning relevance scores to query-response pairs and its training process. Re-rank assigns relevance scores to query-response pairs, and it is trained using good and bad pairs to assign high scores to relevant pairs and low scores to irrelevant pairs.', 'Demonstration of using re-rank to improve keyword search and the limitations of keyword search in finding relevant answers. Re-rank is used to re-rank keyword search results, providing the top 10 answers with the highest relevance scores, addressing the limitations of keyword search in finding relevant answers.']}], 'duration': 438.053, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k2971389.jpg', 'highlights': ["The first result of the dense retrieval search for 'What is the capital of Canada?' is Ottawa.", 'The chapter demonstrates the use of a dense retrieval function to search for the capital of Canada.', 'The process involves creating a client to store Wikipedia entries and importing the dense retrieval function.', 'The role of re-rank in assigning relevance scores to query-response pairs and its training process.', 'Demonstration of using re-rank to improve keyword search and the limitations of keyword search in finding relevant answers.', 'Dense retrieval uses embeddings to find the most similar response to a query, potentially returning semantically close but incorrect answers.']}, {'end': 4363.357, 'segs': [{'end': 3460.34, 'src': 'embed', 'start': 3428.56, 'weight': 0, 'content': [{'end': 3434.57, 'text': 'that again is going to check how relevant are the texts with respect to the query we gave it.', 'start': 3428.56, 'duration': 6.01}, {'end': 3446.708, 'text': 'And when we print the answers, then we get that indeed the one with the highest relevance, 0.97, is the one belonging to Robert Wadlow.', 'start': 3437.02, 'duration': 9.688}, {'end': 3452.053, 'text': 'And for the other articles, it gave them some relevance, but is not as high.', 'start': 3447.349, 'duration': 4.704}, {'end': 3460.34, 'text': 'So re-rank actually helped us identify what is the correct answer to the question among the ones that dense retrieval had surfaced.', 'start': 3452.453, 'duration': 7.887}], 'summary': 'Relevance check shows 0.97 for robert wadlow, re-rank helped identify correct answer.', 'duration': 31.78, 'max_score': 3428.56, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k3428560.jpg'}, {'end': 3505.158, 'src': 'embed', 'start': 3476.494, 'weight': 1, 'content': [{'end': 3482.499, 'text': 'There are several ways to evaluate them, and some of them are mean average precision or MAP,', 'start': 3476.494, 'duration': 6.005}, {'end': 3489.844, 'text': 'mean reciprocal rank or MRR and normalized discounted cumulative gain or NDCG.', 'start': 3482.499, 'duration': 7.345}, {'end': 3494.25, 'text': 'Now, how would you make a test set for evaluating these models?', 'start': 3490.768, 'duration': 3.482}, {'end': 3499.914, 'text': 'Well, a good test set would be one containing queries and correct responses,', 'start': 3494.671, 'duration': 5.243}, {'end': 3505.158, 'text': 'and then you can compare these correct responses with the responses that the model gives you,', 'start': 3499.914, 'duration': 5.244}], 'summary': 'Evaluate models using map, mrr, ndcg. test set should contain queries and correct responses for comparison.', 'duration': 28.664, 'max_score': 3476.494, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k3476494.jpg'}, {'end': 3569.565, 'src': 'embed', 'start': 3544.264, 'weight': 2, 'content': [{'end': 3549.207, 'text': "In this lesson, we'll add a generation step using an LLM at the end of the search pipeline.", 'start': 3544.264, 'duration': 4.943}, {'end': 3554.291, 'text': 'This way, we can get a answer instead of search results, for example.', 'start': 3549.428, 'duration': 4.863}, {'end': 3562.617, 'text': "This is a cool method to build apps where a user can chat with a document or a book, or as we'll see in this lesson, an article.", 'start': 3554.571, 'duration': 8.046}, {'end': 3565.36, 'text': 'Large language models are great at many things.', 'start': 3563.357, 'duration': 2.003}, {'end': 3568.343, 'text': 'There are, however, use cases where they require some help.', 'start': 3565.56, 'duration': 2.783}, {'end': 3569.565, 'text': "Let's take an example.", 'start': 3568.704, 'duration': 0.861}], 'summary': 'Add llm generation step to search pipeline for user interaction. llms are useful but may need assistance in certain cases.', 'duration': 25.301, 'max_score': 3544.264, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k3544264.jpg'}, {'end': 3730.854, 'src': 'embed', 'start': 3701.957, 'weight': 4, 'content': [{'end': 3707.382, 'text': 'We pose them in the prompt to the generative model in addition to the question.', 'start': 3701.957, 'duration': 5.425}, {'end': 3711.906, 'text': 'And then we get that response that was informed by the context.', 'start': 3708.142, 'duration': 3.764}, {'end': 3715.847, 'text': "We'll look at exactly how to do that in the code example next.", 'start': 3712.546, 'duration': 3.301}, {'end': 3718.068, 'text': 'So this is our question.', 'start': 3716.868, 'duration': 1.2}, {'end': 3719.829, 'text': "Let's build our text archive.", 'start': 3718.428, 'duration': 1.401}, {'end': 3724.971, 'text': "For this use case, we'll simply just open these articles and copy the text.", 'start': 3720.789, 'duration': 4.182}, {'end': 3730.854, 'text': 'We can just copy it and paste it in this variable we can call text.', 'start': 3725.832, 'duration': 5.022}], 'summary': 'Using generative model to inform responses, copying text into variable for text archive.', 'duration': 28.897, 'max_score': 3701.957, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k3701957.jpg'}, {'end': 3877.94, 'src': 'embed', 'start': 3847.861, 'weight': 3, 'content': [{'end': 3848.802, 'text': 'So these are the embeddings.', 'start': 3847.861, 'duration': 0.941}, {'end': 3852.825, 'text': 'We create a new index, a vector index.', 'start': 3849.682, 'duration': 3.143}, {'end': 3856.469, 'text': 'We insert the vectors into it and then we build it and save it to file.', 'start': 3852.966, 'duration': 3.503}, {'end': 3859.352, 'text': 'Now we have our vector search.', 'start': 3857.049, 'duration': 2.303}, {'end': 3861.554, 'text': "Let's now define a function.", 'start': 3860.072, 'duration': 1.482}, {'end': 3863.756, 'text': "Let's call this one search.", 'start': 3861.594, 'duration': 2.162}, {'end': 3872.698, 'text': "Andrew's article and we give it a query and it will run a search on this data set.", 'start': 3866.355, 'duration': 6.343}, {'end': 3877.94, 'text': "And to do that, these steps are exactly what we've seen in the past.", 'start': 3873.858, 'duration': 4.082}], 'summary': 'Creating a vector index for embeddings to enable vector search and defining a search function for running queries on the data set.', 'duration': 30.079, 'max_score': 3847.861, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k3847861.jpg'}, {'end': 4074.037, 'src': 'embed', 'start': 4046.614, 'weight': 5, 'content': [{'end': 4050.798, 'text': 'We want to use a model that we call command nightly.', 'start': 4046.614, 'duration': 4.184}, {'end': 4057.207, 'text': 'This is the generation model from cohere that is most rapidly updated.', 'start': 4051.263, 'duration': 5.944}, {'end': 4063.03, 'text': "so if you're using command nightly, you're using the latest models that are available on the platform.", 'start': 4057.207, 'duration': 5.823}, {'end': 4068.754, 'text': "so this tends to be some experimental models, but they're the latest and generally greatest.", 'start': 4063.03, 'duration': 5.724}, {'end': 4074.037, 'text': "So we can stop here we're not using them generations yet but we can use that later.", 'start': 4070.295, 'duration': 3.742}], 'summary': "The 'command nightly' model from cohere is rapidly updated, offering experimental but latest and greatest models.", 'duration': 27.423, 'max_score': 4046.614, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k4046614.jpg'}, {'end': 4130.705, 'src': 'embed', 'start': 4103.703, 'weight': 6, 'content': [{'end': 4106.805, 'text': 'Yes, side projects are a good idea when trying to build a career in AI.', 'start': 4103.703, 'duration': 3.102}, {'end': 4111.831, 'text': 'They can help you develop your skills and knowledge, and can also be a good way to network with other people.', 'start': 4106.906, 'duration': 4.925}, {'end': 4119.158, 'text': "However, you should be careful not to create a conflict with your employer and you should make sure that you're not evaluating any and then we ran out of tokens here,", 'start': 4112.131, 'duration': 7.027}, {'end': 4123.042, 'text': 'so we can just increase the number of tokens here if we want a longer answer.', 'start': 4119.158, 'duration': 3.884}, {'end': 4126.703, 'text': 'So this is a quick demo of how that works.', 'start': 4124.161, 'duration': 2.542}, {'end': 4130.705, 'text': 'you can take it for a spin, ask it a few questions.', 'start': 4126.703, 'duration': 4.002}], 'summary': 'Side projects can aid ai career, but watch for conflicts with employer. also good for networking.', 'duration': 27.002, 'max_score': 4103.703, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k4103703.jpg'}, {'end': 4249.103, 'src': 'embed', 'start': 4192.616, 'weight': 7, 'content': [{'end': 4194.877, 'text': 'This is just a very quick example.', 'start': 4192.616, 'duration': 2.261}, {'end': 4203.48, 'text': 'You can use tools like Llama Index and Langchain to import text from PDF if you want to work on a more industrial scale.', 'start': 4195.177, 'duration': 8.303}, {'end': 4208.051, 'text': 'So remember this numGenerations parameter.', 'start': 4204.588, 'duration': 3.463}, {'end': 4220.701, 'text': "This is a cool tip when you're developing and you want to test out the behavior of the model on a prompt multiple times in every time you hit the API.", 'start': 4208.111, 'duration': 12.59}, {'end': 4225.205, 'text': 'So you can say this is a parameter that we can pass to code.generate.', 'start': 4220.721, 'duration': 4.484}, {'end': 4229.108, 'text': 'We can say numGenerations equal numGenerations.', 'start': 4225.245, 'duration': 3.863}, {'end': 4238.575, 'text': "And then when we're asking the question here, we can say numGenerations equals 3.", 'start': 4230.75, 'duration': 7.825}, {'end': 4241.638, 'text': "And we don't want necessarily to print this.", 'start': 4238.575, 'duration': 3.063}, {'end': 4243.959, 'text': 'We want to print multiple.', 'start': 4241.718, 'duration': 2.241}, {'end': 4249.103, 'text': 'So what happens here is that this question is going to be given to the language model.', 'start': 4244.64, 'duration': 4.463}], 'summary': 'Use tools like llama index and langchain for industrial scale text import. utilize numgenerations parameter for model behavior testing.', 'duration': 56.487, 'max_score': 4192.616, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k4192616.jpg'}, {'end': 4351.452, 'src': 'embed', 'start': 4320.331, 'weight': 9, 'content': [{'end': 4326.235, 'text': 'We invite you to check our more extensive course in LLMs at Cohere called LLM University.', 'start': 4320.331, 'duration': 5.904}, {'end': 4330.658, 'text': 'In this course, you can learn a lot more topics regarding LLMs.', 'start': 4326.975, 'duration': 3.683}, {'end': 4341.132, 'text': "Also, you can join Cohere's Discord community, where Jay, myself, and others will be more than happy to answer any questions you may have about LLMs.", 'start': 4331.929, 'duration': 9.203}, {'end': 4351.452, 'text': "We also want to thank many people without whom this course wouldn't have been possible, like Miur Amer, Adrian Morisot, Elliot Choi, Ivan Shang,", 'start': 4341.592, 'duration': 9.86}], 'summary': 'Llm university at cohere offers an extensive course covering various llm topics, with support from a discord community and gratitude to key contributors.', 'duration': 31.121, 'max_score': 4320.331, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k4320331.jpg'}], 'start': 3409.943, 'title': 'Ai and language models', 'summary': 'Covers re-ranking for search systems, vector search index creation, and the application of large language models in ai. it emphasizes context in factual generations and the use of a large language model to answer specific queries, as well as practical tips for skill development and networking.', 'chapters': [{'end': 3819.825, 'start': 3409.943, 'title': 'Search systems and re-ranking', 'summary': 'Discusses the use of re-ranking to improve search results, evaluation methods for search systems, and the combination of a search system and a generation model to output answers to queries, highlighting the importance of context in improving factual generations.', 'duration': 409.882, 'highlights': ['The use of re-ranking to improve search results Re-ranking results based on relevance, with the highest relevance being 0.97 for the correct answer.', 'Evaluation methods for search systems Various evaluation methods such as mean average precision (MAP), mean reciprocal rank (MRR), and normalized discounted cumulative gain (NDCG) are discussed.', 'Combining a search system and a generation model to output answers to queries Utilizing a generation step using a large language model at the end of the search pipeline to retrieve answers from specific documents, archives, or domains.']}, {'end': 4068.754, 'start': 3821.035, 'title': 'Vector search and language model for ai', 'summary': 'Demonstrates the process of creating a vector search index for a dataset and defining a function to perform a search, as well as utilizing a language model to extract relevant information for a given question, emphasizing the use of a large language model to answer a specific query.', 'duration': 247.719, 'highlights': ['Creating a vector search index and defining a search function The chapter covers the process of creating a new index, inserting vectors into it, and defining a search function to run a search on a given dataset.', 'Utilizing a language model to extract relevant information The demonstration includes defining a new function to ask a specific question related to an article, injecting relevant context into the prompt, and instructing the model to extract the answer from the provided text.', "Explanation of using the 'command nightly' model for generation The chapter explains the use of the 'command nightly' model, which is the generation model from cohere that is most rapidly updated, offering the latest experimental models available on the platform."]}, {'end': 4363.357, 'start': 4070.295, 'title': 'Building with large language models', 'summary': 'Discusses the application of large language models in ai, emphasizing the benefits of side projects for skill development, networking, and prompt engineering, along with practical tips such as adjusting numgenerations parameter and utilizing tools like llama index and langchain.', 'duration': 293.062, 'highlights': ['Side projects are beneficial for skill development and networking in AI, but caution is required to avoid conflicts with employers and ethical considerations.', 'Adjusting the numGenerations parameter allows for testing model behavior and prompt engineering by obtaining multiple generations in response to the same prompt.', 'Tools like Llama Index and Langchain can be used to import text from PDF for working on a more industrial scale, providing practical assistance in developing with large language models.', "Acknowledgment and encouragement for further learning and community engagement with Cohere's Discord community and LLM University course are provided at the end of the transcript."]}], 'duration': 953.414, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YhuUch6U52k/pics/YhuUch6U52k3409943.jpg', 'highlights': ['Re-ranking results based on relevance, with the highest relevance being 0.97 for the correct answer.', 'Various evaluation methods such as mean average precision (MAP), mean reciprocal rank (MRR), and normalized discounted cumulative gain (NDCG) are discussed.', 'Utilizing a generation step using a large language model at the end of the search pipeline to retrieve answers from specific documents, archives, or domains.', 'Creating a vector search index, inserting vectors into it, and defining a search function to run a search on a given dataset.', 'Demonstration includes defining a new function to ask a specific question related to an article, injecting relevant context into the prompt, and instructing the model to extract the answer from the provided text.', "Explanation of using the 'command nightly' model for generation.", 'Side projects are beneficial for skill development and networking in AI, but caution is required to avoid conflicts with employers and ethical considerations.', 'Adjusting the numGenerations parameter allows for testing model behavior and prompt engineering by obtaining multiple generations in response to the same prompt.', 'Tools like Llama Index and Langchain can be used to import text from PDF for working on a more industrial scale, providing practical assistance in developing with large language models.', "Acknowledgment and encouragement for further learning and community engagement with Cohere's Discord community and LLM University course are provided at the end of the transcript."]}], 'highlights': ['LLMs enable systems to search websites or databases to answer user questions, improving the overall search experience.', 'Teaching semantic search with LLMs includes basic keyword search, re-rank method, and dense retrieval with embeddings.', 'The chapter emphasizes the use of LLMs to generate answers based on search results.', 'The database contains 10 million records from Wikipedia passages in 10 different languages, with 1 million in English and 9 million in other languages.', 'Keyword search involves comparing the number of shared words between the query and the documents, with the BM25 algorithm used to score the documents based on shared words.', 'The BM25 algorithm scores documents in the archive based on a specific formula that looks at the count of shared words between the query and each document.', 'Creating a keyword search function in Weaviate involves passing the query as a parameter and implementing filters for language and result limit.', 'Filtering by language and specifying result limit explains the approach to limit search results to English language and set the default number of results to three, with the flexibility to change these parameters.', 'Printing the response discusses the function to print the search results in a structured manner, enhancing the readability of the retrieved data.', 'Language models can improve both search stages, with a focus on embeddings in lesson two.', 'Words are embedded as vectors, with the example of the word apple being associated with the coordinates (5, 5) among other grouped words like sports, houses, buildings, castles, vehicles, and fruits.', 'The chapter discusses dense retrieval for semantic search.', 'V8 uses vector search for matching queries with similar text, demonstrated by finding the author of Hamlet with relevant results.', 'Dense retrieval provides more relevant results compared to keyword search, as demonstrated by finding the capital of Canada and the tallest person in history.', 'The distance number returned by V8 indicates the proximity of the query to the matched text, providing a quantifiable measure of similarity.', 'The multilingual capabilities of dense retrieval enable search in different languages, as demonstrated by matching queries in German and Arabic with results in other languages.', 'Exploration using semantic search allows for the discovery of relevant information and data sets, promoting a deeper understanding and engagement with the search results.', 'Transitioning to building a vector search database involves importing necessary libraries, including Annoy for nearest neighbor search, and discussing the differences between nearest neighbor libraries and vector databases.', 'The chapter discusses the process of chunking text for semantic search, including considerations for splitting text into sentences or paragraphs and the importance of using libraries for processing noisy text.', 'The chapter explains the process of chunking a Wikipedia page into paragraphs or sentences and embedding each chunk to create vectors representing the meaning of the text, with each sentence being represented by a 4000-number vector.', 'It outlines the process of building a search index by iterating over the embeddings of the text chunks, inserting them into the index, and then saving the index to file to disk, ready to send queries and retrieve the nearest results.', 'The chapter demonstrates a basic search function that embeds a query, sends it to the vector search index, retrieves the top three nearest neighbors to the query, and formats and prints the results, showcasing the capability to find relevant information within the documents.', 'Annoy, an open source library from Spotify, is a tool for approximate nearest neighbor vector search.', 'Vector databases allow for easier addition and modification of records without requiring the rebuilding of the index.', 'Vector search libraries tend to be simpler to set up and install than vector databases.', 'Hybrid search involves using both keyword search and vector search together in the same pipeline.', 'The process of dense retrieval involves assigning a score to each document in the text archive and aggregating these scores to present the best search results.', "The first result of the dense retrieval search for 'What is the capital of Canada?' is Ottawa.", 'The chapter demonstrates the use of a dense retrieval function to search for the capital of Canada.', 'The process involves creating a client to store Wikipedia entries and importing the dense retrieval function.', 'The role of re-rank in assigning relevance scores to query-response pairs and its training process.', 'Demonstration of using re-rank to improve keyword search and the limitations of keyword search in finding relevant answers.', 'Re-ranking results based on relevance, with the highest relevance being 0.97 for the correct answer.', 'Various evaluation methods such as mean average precision (MAP), mean reciprocal rank (MRR), and normalized discounted cumulative gain (NDCG) are discussed.', 'Utilizing a generation step using a large language model at the end of the search pipeline to retrieve answers from specific documents, archives, or domains.', 'Creating a vector search index, inserting vectors into it, and defining a search function to run a search on a given dataset.', 'Demonstration includes defining a new function to ask a specific question related to an article, injecting relevant context into the prompt, and instructing the model to extract the answer from the provided text.', "Explanation of using the 'command nightly' model for generation.", 'Side projects are beneficial for skill development and networking in AI, but caution is required to avoid conflicts with employers and ethical considerations.', 'Adjusting the numGenerations parameter allows for testing model behavior and prompt engineering by obtaining multiple generations in response to the same prompt.', 'Tools like Llama Index and Langchain can be used to import text from PDF for working on a more industrial scale, providing practical assistance in developing with large language models.', "Acknowledgment and encouragement for further learning and community engagement with Cohere's Discord community and LLM University course are provided at the end of the transcript."]}