mirror of
https://github.com/hwchase17/langchain.git
synced 2026-01-23 05:09:12 +00:00
Compare commits
10 Commits
langchain-
...
retrievalq
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea64e6cec6 | ||
|
|
baccd2facf | ||
|
|
a1ba5cc6b9 | ||
|
|
07a9511e9c | ||
|
|
26aff89b95 | ||
|
|
2059edd834 | ||
|
|
2547048ccd | ||
|
|
b1834338e8 | ||
|
|
a036a29af7 | ||
|
|
d1b92537b0 |
@@ -17,7 +17,7 @@ from langchain.chains.base import Chain
|
||||
from langchain.input import get_colored_text
|
||||
from langchain.prompts.base import BasePromptTemplate
|
||||
from langchain.prompts.prompt import PromptTemplate
|
||||
from langchain.schema import LLMResult, PromptValue
|
||||
from langchain.schema import LLMResult, PromptValue, Generation
|
||||
|
||||
|
||||
class LLMChain(Chain):
|
||||
@@ -39,6 +39,11 @@ class LLMChain(Chain):
|
||||
llm: BaseLanguageModel
|
||||
output_key: str = "text" #: :meta private:
|
||||
|
||||
# Expose raw prompt which can't be easily re-constructed in deeply nested chain.
|
||||
prompt_template_cache_key = ""
|
||||
prompt_cache: dict = {}
|
||||
populate_prompt_cache: bool = False
|
||||
|
||||
class Config:
|
||||
"""Configuration for this pydantic object."""
|
||||
|
||||
@@ -76,6 +81,15 @@ class LLMChain(Chain):
|
||||
) -> LLMResult:
|
||||
"""Generate LLM result from inputs."""
|
||||
prompts, stop = self.prep_prompts(input_list, run_manager=run_manager)
|
||||
|
||||
if self.populate_prompt_cache:
|
||||
for template, prompt in zip(input_list, prompts):
|
||||
if self.prompt_template_cache_key in template:
|
||||
key = template[self.prompt_template_cache_key]
|
||||
self.prompt_cache[key] = prompt.to_string()
|
||||
|
||||
return LLMResult(generations=[[Generation(text="Shunted generation!")]])
|
||||
|
||||
return self.llm.generate_prompt(
|
||||
prompts, stop, callbacks=run_manager.get_child() if run_manager else None
|
||||
)
|
||||
|
||||
@@ -51,7 +51,9 @@ class QAGenerationChain(Chain):
|
||||
inputs: Dict[str, Any],
|
||||
run_manager: Optional[CallbackManagerForChainRun] = None,
|
||||
) -> Dict[str, List]:
|
||||
docs = self.text_splitter.create_documents([inputs[self.input_key]])
|
||||
# Passing [inputs] has the effect, not sure if intended, of concat'ing several texts into a single doc...
|
||||
# docs = self.text_splitter.create_documents([inputs[self.input_key]])
|
||||
docs = self.text_splitter.create_documents(inputs[self.input_key])
|
||||
results = self.llm_chain.generate(
|
||||
[{"text": d.page_content} for d in docs], run_manager=run_manager
|
||||
)
|
||||
|
||||
226
langchain/experimental/finetune/retrieval_qa/dataset.py
Normal file
226
langchain/experimental/finetune/retrieval_qa/dataset.py
Normal file
@@ -0,0 +1,226 @@
|
||||
import glob
|
||||
import json
|
||||
import os
|
||||
import pickle
|
||||
import random
|
||||
import re
|
||||
import sys
|
||||
import time
|
||||
|
||||
sys.path.insert(0, os.path.join(os.path.expanduser("~"), "src/langchain"))
|
||||
|
||||
from json import JSONDecodeError
|
||||
from typing import Dict, List
|
||||
|
||||
from tqdm import tqdm
|
||||
|
||||
from langchain.chains import QAGenerationChain, RetrievalQA
|
||||
from langchain.chat_models import ChatOpenAI
|
||||
from langchain.embeddings.openai import OpenAIEmbeddings
|
||||
from langchain.llms import OpenAI
|
||||
from langchain.text_splitter import CharacterTextSplitter
|
||||
from langchain.vectorstores import FAISS
|
||||
from langchain.vectorstores.base import VectorStoreRetriever
|
||||
|
||||
|
||||
def _timestamp() -> str:
|
||||
from datetime import datetime
|
||||
|
||||
from pytz import timezone
|
||||
|
||||
return datetime.now(timezone("US/Pacific")).strftime("%Y-%m-%d-%H-%M")
|
||||
|
||||
|
||||
def _extract_corpus_from_transcripts(
|
||||
transcripts_glob="./transcripts/vtt/*large.vtt",
|
||||
) -> str:
|
||||
"""
|
||||
Splice out timestamps from Video Text Track transcripts and
|
||||
concat, yielding a continuous string of text (eg not even speaker roles delimited)
|
||||
"""
|
||||
fps = glob.glob(transcripts_glob)
|
||||
transcripts = []
|
||||
for fp in fps:
|
||||
with open(fp) as f:
|
||||
transcript = f.read()
|
||||
transcript = re.sub(
|
||||
r"\d+:?\d+:\d+\.\d+ --> \d+:?\d+:\d+\.\d+.*\n", "", transcript
|
||||
)
|
||||
transcript = transcript.replace("\n\n", "")
|
||||
transcript = re.sub(r"^WEBVTT", "", transcript)
|
||||
transcripts.append(transcript)
|
||||
|
||||
return " ".join(transcripts)
|
||||
|
||||
|
||||
def generate_retrieval_qa_dataset(
|
||||
dataset_size: int,
|
||||
chunks: List[str],
|
||||
qa_gen_chain: QAGenerationChain,
|
||||
retriever: VectorStoreRetriever,
|
||||
checkpoint: bool = True,
|
||||
) -> List[Dict[str, str]]:
|
||||
"""Query LM to generate question, answer pairs for a given context.
|
||||
Reject any question that cannot be used to retrieve its generating context.
|
||||
|
||||
The goal is to finetune the QA component of a RetrievalQAChain. Without rejection sampling like so,
|
||||
when we run the RetrievalQAChain to build prompt, completion pairs, an "imprecise" question will retrieve
|
||||
context that's not related at all to the answer, in effect encouraging hallucination.
|
||||
|
||||
Args:
|
||||
dataset_size: desired number of question, answer pairs
|
||||
chunks: contexts for question, answer pairs
|
||||
retriever: retriever over chunks
|
||||
checkpoint: save every so often, useful for OpenAI chat competions which cannot currently be processed in parallel
|
||||
|
||||
Returns:
|
||||
dicts with "question" and "answer" keys.
|
||||
"""
|
||||
start_time = _timestamp()
|
||||
accepted, rejected = [], []
|
||||
|
||||
tic = time.time()
|
||||
while len(accepted) < dataset_size:
|
||||
if len(accepted) % 25 == 0:
|
||||
toc = time.time()
|
||||
print(f"{len(accepted)=} {len(rejected)=} after {(toc-tic)/60:.2f} min")
|
||||
if checkpoint:
|
||||
if not os.path.exist("./tmp"):
|
||||
os.makedirs("./tmp")
|
||||
pickle.dump(accepted, open(f"./tmp/accepted-{start_time}.pkl", "wb"))
|
||||
pickle.dump(rejected, open(f"./tmp/rejected-{start_time}.pkl", "wb"))
|
||||
|
||||
chunk = random.choice(chunks)
|
||||
try:
|
||||
qa = qa_gen_chain.run([chunk])[0]
|
||||
except JSONDecodeError:
|
||||
continue
|
||||
|
||||
docs = retriever.get_relevant_documents(qa["question"])
|
||||
|
||||
if any(doc.page_content == chunk for doc in docs):
|
||||
accepted.append((qa, docs))
|
||||
else:
|
||||
rejected.append((qa, chunk, docs))
|
||||
|
||||
return [qa[0] for qa in accepted]
|
||||
|
||||
|
||||
def generate_retrieval_qa_t2t_dataset(
|
||||
qa_dataset: List[Dict[str, str]], qa_chain: RetrievalQA
|
||||
):
|
||||
"""Run retrieval step and generate prompt, completion pairs for fine-tuning.
|
||||
|
||||
Returns:
|
||||
dicts with "question", "answer", and "question_with_context" keys.
|
||||
"""
|
||||
# https://github.com/hwchase17/langchain/commit/d1b92537b00db5a1eb09bcaa448652781b679b5a
|
||||
# I have to hack to expose the prompt that's been "stuffed" with the result of retrieval.
|
||||
qa_chain.combine_documents_chain.llm_chain.populate_prompt_cache = True
|
||||
qa_chain.combine_documents_chain.llm_chain.prompt_template_cache_key = "question"
|
||||
|
||||
for example in tqdm(qa_dataset):
|
||||
qa_chain(example["question"])
|
||||
|
||||
qa_chain.combine_documents_chain.llm_chain.populate_prompt_cache = (
|
||||
False # Unset to un-shunt generations.
|
||||
)
|
||||
|
||||
out = []
|
||||
for example in tqdm(qa_dataset):
|
||||
question = example["question"]
|
||||
raw_prompt = qa_chain.combine_documents_chain.llm_chain.prompt_cache[question]
|
||||
out.append({**example, "question_with_context": raw_prompt})
|
||||
return out
|
||||
|
||||
|
||||
def main(dataset_size: int, context_size: int, skip_datagen: bool = False):
|
||||
"""
|
||||
Args:
|
||||
dataset_size: # of QA pairs to synthesize
|
||||
context_size: # of tokens accepted by LM we'll finetune on QA pairs
|
||||
e.g. google/flan-t5-* is only 512 tokens, so the retrieval chunk size will also be small.
|
||||
skip_datagen: already synthesized the datasets, want to re-construct the corpus + retriever for evaluation
|
||||
"""
|
||||
|
||||
corpus = _extract_corpus_from_transcripts()
|
||||
# TODO: temporarily 37e6 -> 10e6
|
||||
corpus = corpus[: int(10e6)]
|
||||
|
||||
# Also TODO: this is a weak approximation, having to drop samples when actually tokenizing
|
||||
chars = context_size * 4
|
||||
retrieval_chars = chars - 250
|
||||
retrieval_k = 3
|
||||
chunk_size = round(retrieval_chars // retrieval_k, -1)
|
||||
|
||||
chunker = CharacterTextSplitter(
|
||||
separator=" ", chunk_size=chunk_size, chunk_overlap=chunk_size // 10
|
||||
)
|
||||
chunks = chunker.split_text(corpus)
|
||||
vectorstore = FAISS.from_texts(chunks, OpenAIEmbeddings())
|
||||
retriever = vectorstore.as_retriever(k=retrieval_k)
|
||||
|
||||
if skip_datagen:
|
||||
return retriever
|
||||
|
||||
llm = OpenAI(temperature=0)
|
||||
chat_llm = ChatOpenAI(temperature=0)
|
||||
|
||||
# QAGenerationChain default to chat model.
|
||||
qa_gen_chain = QAGenerationChain.from_llm(chat_llm)
|
||||
|
||||
# But QAChain fine-tuning non-chat model.
|
||||
qa_chain = RetrievalQA.from_chain_type(
|
||||
llm=llm,
|
||||
chain_type="stuff",
|
||||
retriever=retriever,
|
||||
input_key="question",
|
||||
return_source_documents=False,
|
||||
)
|
||||
|
||||
qa_ds = generate_retrieval_qa_dataset(dataset_size, chunks, qa_gen_chain, retriever)
|
||||
t2t_qa_ds = generate_retrieval_qa_t2t_dataset(qa_ds, qa_chain)
|
||||
return t2t_qa_ds
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
dataset_size = 1000
|
||||
context_size = 512 # small experiment to start: google/flan-t5-base
|
||||
|
||||
# Synthesize dataset. This takes awhile with chat completions api atm.
|
||||
# t2t_qa_ds = main(dataset_size, context_size)
|
||||
# with open("./tmp/t2t_qa_ds_2023_05_17.json", "w") as f:
|
||||
# json.dump(t2t_qa_ds, f)
|
||||
|
||||
# Baseline accuracy with QAEvalChain. How well does gpt-3.5-turbo (used for datagen + eval) do on the task?
|
||||
retriever = main(dataset_size, context_size, skip_datagen=True)
|
||||
with open("./tmp/t2t_qa_ds_2023_05_17.json") as f:
|
||||
t2t_qa_ds = json.load(f)
|
||||
|
||||
from langchain.evaluation.qa import QAEvalChain
|
||||
|
||||
chat_llm = ChatOpenAI(temperature=0)
|
||||
qa_chain = RetrievalQA.from_chain_type(
|
||||
llm=chat_llm,
|
||||
chain_type="stuff",
|
||||
retriever=retriever,
|
||||
input_key="question",
|
||||
return_source_documents=False,
|
||||
)
|
||||
qa_eval_chain = QAEvalChain.from_llm(chat_llm)
|
||||
|
||||
t2t_qa_ds_subsampled = random.sample(t2t_qa_ds, k=100)
|
||||
results = []
|
||||
for example in tqdm(t2t_qa_ds_subsampled):
|
||||
answer = qa_chain(example["question"])
|
||||
ground_truth = {"question": example["question"], "answer": example["answer"]}
|
||||
prediction = {"result": answer}
|
||||
res = qa_eval_chain.evaluate(
|
||||
[ground_truth], [prediction], question_key="question"
|
||||
)[0]
|
||||
results.append({**ground_truth, **prediction, "evaluation": res["text"]})
|
||||
|
||||
results_correct = sum(
|
||||
result["evaluation"].lower() == "correct" for result in results
|
||||
)
|
||||
print(f"{results_correct=} {len(results)=}")
|
||||
11
langchain/experimental/finetune/retrieval_qa/download_transcripts.sh
Executable file
11
langchain/experimental/finetune/retrieval_qa/download_transcripts.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -ex
|
||||
|
||||
url="https://karpathy.ai/lexicap/data.zip"
|
||||
filename="data.zip"
|
||||
directory="transcripts"
|
||||
|
||||
mkdir -p $directory
|
||||
curl -o $filename $url
|
||||
tar -xf $filename -C $directory
|
||||
rm $filename
|
||||
9845
langchain/experimental/finetune/retrieval_qa/finetune.ipynb
Normal file
9845
langchain/experimental/finetune/retrieval_qa/finetune.ipynb
Normal file
File diff suppressed because it is too large
Load Diff
25
langchain/experimental/finetune/retrieval_qa/next.txt
Normal file
25
langchain/experimental/finetune/retrieval_qa/next.txt
Normal file
@@ -0,0 +1,25 @@
|
||||
current:
|
||||
- finetune small, easy to operationalize instruction following LM for QA using QAGenerationChain
|
||||
- some observations on flan-t5-base, finetuned on ~1000 samples:
|
||||
- dataset:
|
||||
- wrt size, bumping 250->500->1000 samples yield proportional gains in performance
|
||||
- with and without peft/lora
|
||||
- no glaring difference at first glance, tho can easily finetune on collab free
|
||||
- that said, didn't study regression (eg ppl) with full fine-tuning
|
||||
- evaluation
|
||||
- QAEvalChain
|
||||
- have to dig further, sometimes just wrong, sometimes could benefit from more granularity/rubric-style
|
||||
- precision (bleu), recall (rouge) style metrics
|
||||
- quite a bit better on finetune
|
||||
- manual
|
||||
- it's decent, basically seems feasible to adapt a small flan in the style of the gpt-3.5-turbo-synthesized answers
|
||||
|
||||
next:
|
||||
- run fine-tune in RetrievalQAChain to do a better side-by-side
|
||||
- there's no HuggingFaceModel?
|
||||
- lora/peft merge
|
||||
- some more error analysis, some more scale in data and maybe model (esp. for more realistic retrieval setting, larger chunk size, etc.)
|
||||
|
||||
later/not important just noting:
|
||||
- LLMChain doesn't expose raw prompt (and in turn any chain wrapping an LLMChain too), so I have some stateful hackery
|
||||
- QAGenerationChain is slow => chat completions api has no parallel proc support
|
||||
@@ -0,0 +1,352 @@
|
||||
What is the speaker's opinion on acknowledging someone else while doing the thing?
|
||||
What is the speaker's opinion on relying on machines to do work?
|
||||
What does the speaker think about the possibility of manipulating gravity in our universe?
|
||||
What are some of the challenges associated with proof of work mining?
|
||||
What does the speaker hope for regarding the actions of leaders in response to COVID?
|
||||
What is the topic of the text?
|
||||
What is the speaker's opinion on the computational universe?
|
||||
What does the author think about death?
|
||||
What is the name of the person being interviewed in the text?
|
||||
What is one of the things discussed in Deep Work that is important?
|
||||
What is one thing we know for sure about the brain?
|
||||
What did the speaker learn from watching a video on neural networks?
|
||||
What was the original plan for the book mentioned in the text?
|
||||
What did the speaker find out by looking at the data?
|
||||
What kind of player is he?
|
||||
What is the era that the speaker refers to as we are entering?
|
||||
What approach did the author's team use for language understanding?
|
||||
What is the benefit of automated mechanism design?
|
||||
What is the block size debate about?
|
||||
What does the speaker compare themselves to?
|
||||
What is the bitter lesson according to the text?
|
||||
What is the speaker trying to realize and live up to?
|
||||
What is the speaker's personal experience with thinking?
|
||||
What is the topic of the panel discussion that the speaker saw on YouTube?
|
||||
What is the main tension that the speaker is discussing?
|
||||
What was the speaker's initial reaction when they heard about the topic?
|
||||
What is the speaker referring to when they mention 'the ledger'?
|
||||
What is the trope mentioned in the text?
|
||||
What is the most important step in starting a business according to the speaker?
|
||||
What is the author analyzing in the given text?
|
||||
What is the most challenging part of conducting experiments according to the text?
|
||||
What was the challenge mentioned in the text?
|
||||
What is the beauty of the concept being discussed?
|
||||
What does the speaker think is more exciting in science?
|
||||
What is the neocortex and how is it structured?
|
||||
What is the name of the song the narrator was listening to?
|
||||
What does the speaker say about making an individual part perfect?
|
||||
What inspires people to come up with new technologies that make a difference?
|
||||
What does the speaker think will happen if self-driving vehicles don't happen?
|
||||
What does the speaker believe about intelligence?
|
||||
What is the difference between science and commerce according to TK?
|
||||
What does the speaker suggest is the reason for people's intrinsic goodness?
|
||||
What is the author's opinion on having world wars?
|
||||
What is the speaker's opinion on the evolution of the universe?
|
||||
What does the speaker think about predicting with all the data around today?
|
||||
What was one of the hardest things the speaker has ever done?
|
||||
What is the author's opinion on the power of culture?
|
||||
What is the topic of the podcast mentioned in the text?
|
||||
What is the topic of the conversation?
|
||||
What is the speaker's advice to the listener regarding their goal?
|
||||
What is the author's opinion on SpaceX?
|
||||
What is the speaker's opinion on predicting the future?
|
||||
What is the range of expertise among the physicists and mathematicians mentioned in the text?
|
||||
What does the speaker refer to as 'attachment' in Buddhism?
|
||||
What is the topic of discussion in the given text?
|
||||
What is the name of the finance app that presents the show?
|
||||
What is the speaker's attitude towards partnering with others?
|
||||
What is the speaker's opinion of the person who brought evil onto the world?
|
||||
What is the basic task of humans according to the text?
|
||||
What is the concept of ZK snarks?
|
||||
What is the topic of discussion in the given text?
|
||||
What event were the speaker and John doing together?
|
||||
What is the topic of discussion in the given text?
|
||||
What does the speaker think about the scenarios where robots are tethered to something that makes them our slaves?
|
||||
What is the author discussing in this passage?
|
||||
What is the speaker's opinion on the importance of an interactive component in teaching?
|
||||
What is the analogy used to describe Bitcoin in the text?
|
||||
What is the Patrushev project that is mentioned in the text?
|
||||
What is the speaker's opinion on sex robots?
|
||||
What is the human mind doing while a person is driving?
|
||||
What is the speaker's opinion on the violence that occurred during wars in the past?
|
||||
What advice does the speaker give to avoid boredom?
|
||||
What is Novid and what kind of work have they been doing?
|
||||
What did the speaker learn about during the conversation?
|
||||
What is the theory being discussed in the text?
|
||||
What question does the speaker ask the author?
|
||||
What are some benefits of using a faster network?
|
||||
What is the speaker's advice for finding self-love?
|
||||
What is the West and how is it defined?
|
||||
What is the middle camp's view on consciousness and information processing?
|
||||
What happened to the virus over time?
|
||||
What is Numba and why was it created?
|
||||
What is the speaker's favorite set of games?
|
||||
What is the ethical question posed by the author?
|
||||
What topic is the speaker interested in after buying three books on boredom?
|
||||
What does the speaker mean when they say they are 'playing up a side of yourself'?
|
||||
What is the daily routine that the speaker follows?
|
||||
What is the speaker's vision for using AI in language translation?
|
||||
What is the author's opinion about the possibility of aliens existing?
|
||||
What is the quote that the speaker keeps on their phone?
|
||||
What is the question that the speaker asks the listener?
|
||||
What is the remarkable achievement mentioned in the text?
|
||||
What are the names of the sponsors mentioned in the podcast?
|
||||
What is an example of an interaction where AI should not have a conversation with you?
|
||||
What does first principles thinking require?
|
||||
What is the author's opinion on the current understanding of the human body?
|
||||
What is the author's opinion on the use of the terms 'machine learning' and 'deep learning'?
|
||||
What is the magic of deep learning?
|
||||
What does the speaker think about expertise?
|
||||
What does the author think about the ability of a group to make ethical decisions?
|
||||
What is the author describing in terms of their experience with the Olympic games?
|
||||
What is the benefit of bypassing the image processor?
|
||||
What is the comparison made between becoming a great comic and Jiu Jitsu?
|
||||
What does the author believe about the idea that technology is values agnostic?
|
||||
What is the speaker's motivation for working on AI?
|
||||
What is the name of the book that the speaker mentions as one of their favorites?
|
||||
Why is experiencing wins and losses important?
|
||||
What is the potential danger of people who think it's the end times?
|
||||
What does the speaker think about the idea of living forever?
|
||||
What did the speaker learn from the person mentioned in the text?
|
||||
What is the author's opinion on teaching math?
|
||||
What is the topic of discussion in this text?
|
||||
What is one of the things that is important to people on a day to day basis?
|
||||
What is the speaker going to argue against?
|
||||
What is the author's opinion on the importance of captivation?
|
||||
What is the main concern regarding the use of data mentioned in the text?
|
||||
What feature did they recently launch and why?
|
||||
What is the neural network being compared to in this text?
|
||||
What is the speaker's main concern when it comes to their job?
|
||||
What is the initial focus of the project?
|
||||
Who is the author dedicating their book to?
|
||||
What is the poker community's opinion of the player being discussed?
|
||||
What did the speaker switch to from experimental physics?
|
||||
What does the author think it takes to make the world a better place?
|
||||
What is the speaker's background in computer science?
|
||||
What is the speaker's opinion about the person they are talking to?
|
||||
What is the speaker's opinion on discovering joy?
|
||||
What is the speaker's opinion on journals?
|
||||
What is the speaker's opinion on making major irreversible life decisions?
|
||||
What company is being discussed in the text?
|
||||
What is the author's opinion on the current systems?
|
||||
What is the author's opinion on the potential of Librex?
|
||||
What did David give to the speaker when they visited his lab at MIT?
|
||||
What is the bigger problem in capitalism according to the speaker?
|
||||
What is the author suggesting we should do more of?
|
||||
What was the mechanism that helped the speaker start listening to their body?
|
||||
What is the phenomenon that the speaker is describing?
|
||||
What was the conversation the speaker was calling for?
|
||||
What did the speaker work on in the 1980s?
|
||||
What is the brain doing when it makes predictions?
|
||||
What is the speaker's concern regarding the current situation?
|
||||
What are some ways to support the podcast mentioned in the text?
|
||||
What is the speaker's opinion on the program's information?
|
||||
What is the speaker's concern about the system?
|
||||
What odds did the speaker put on P equaling NP?
|
||||
What is the conversation the speaker had with Dan Carlin?
|
||||
What does the speaker find fascinating?
|
||||
What is the main difference between this game and chess or turn-based strategy games?
|
||||
What is the speaker's theory related to quantum?
|
||||
What is the breakthrough prize awarded for?
|
||||
What is the significance of the people mentioned in the text?
|
||||
What is the network sometimes called that represents the spread of a virus?
|
||||
What is the example given in the text of a scientist who was trying to understand a complex problem for months?
|
||||
What does the speaker mean when they say 'putting a new cartridge in your brain'?
|
||||
What is quantum field theory?
|
||||
What areas of research require massive funding according to the text?
|
||||
What is becoming more common these days when a person passes away?
|
||||
What is the suggested method for efficiently transmitting information across the network?
|
||||
What did the woman ask the author when she expressed interest in his book?
|
||||
What is the system that the speaker is referring to and how has it been trained?
|
||||
What analogy does the speaker use to describe the process of consciousness being generated?
|
||||
What is the speaker's opinion on using only neural networks for problem-solving?
|
||||
What is the 'alignment problem' referred to in the text?
|
||||
What is one of the things that is important to people on a day to day basis?
|
||||
What is the text discussing?
|
||||
What did Trump tap into according to the text?
|
||||
What is the message that people have been hearing over and over throughout human history?
|
||||
What is the David Goggins model?
|
||||
What is neuromorphic computing?
|
||||
What are some of the books mentioned in the text?
|
||||
What are the problems that you have to attack?
|
||||
What is an example of a problem in NP?
|
||||
What is the joke that the speaker and their friend share?
|
||||
What are the two psychological reasons mentioned by the speaker?
|
||||
What is the name of the podcast mentioned in the text?
|
||||
What does the speaker love about disagreements?
|
||||
What is the author's question regarding the vaccine and their mind?
|
||||
What is the speaker's experience with sauna?
|
||||
What is the author disappointed by in the community?
|
||||
What is the concept described in the text?
|
||||
What is the paradigm that was tested in a very interesting way?
|
||||
What is the speaker's opinion on the possibility of aliens showing up?
|
||||
What is the task that may not seem trivial?
|
||||
What is the speaker's opinion about the task at hand?
|
||||
What are some advantages of using Ethereum instead of Bitcoin?
|
||||
What is the author questioning the possibility of?
|
||||
What is the speaker's opinion on the interaction between machines and humans?
|
||||
What is the speaker pondering about in regards to a petabyte of memory?
|
||||
What does the speaker believe is necessary for longterm growth?
|
||||
What is the importance of consciousness according to the text?
|
||||
What is the trade off being discussed in this text?
|
||||
What is the dilemma that the speaker is referring to?
|
||||
What is the purpose of the dojo system?
|
||||
What is the analogy used to describe emergent patterns?
|
||||
What is the music video that the speaker mentions in the text?
|
||||
What advice does the speaker ask for from the person being addressed?
|
||||
What is the challenge mentioned in the text?
|
||||
What is the author's opinion on the concept of life being short?
|
||||
What did the speaker learn from the language they were using?
|
||||
What is the set theoretic hierarchy?
|
||||
What is the big discovery of the principle mentioned in the text?
|
||||
What is the libertarian perspective on government and military?
|
||||
Why does the speaker feel the need to be sharp when acting on screen?
|
||||
What is Edward?
|
||||
What is the question in the space of all possible intelligences?
|
||||
What is the author discussing in this passage?
|
||||
What does the speaker credit for their success?
|
||||
What is the topic of discussion in the text?
|
||||
What is the main problem the speaker is facing?
|
||||
What was Dick Feynman's opinion on quantum mechanics?
|
||||
What is the author disappointed in regarding expertise in science?
|
||||
What is the speaker's opinion on the Holocaust?
|
||||
What is an organoid and can it mimic different regions of the brain?
|
||||
What are the two deeply human aspects mentioned in the text?
|
||||
What are the two fields that the speaker particularly focuses on?
|
||||
What is the speaker's opinion on Bitcoin?
|
||||
What is the author's point about our dependence on supply chains?
|
||||
What is the author discussing in this text?
|
||||
What is the topic of discussion in this text?
|
||||
What is the purpose of the author's writing style in 'just my stuff'?
|
||||
What have they been talking about in regards to robots?
|
||||
What is the town square test and who proposed it?
|
||||
What is the fallacy that the speaker talks about in the given text?
|
||||
What experimental test did the speaker propose based on the professor's statement?
|
||||
What is the theme of exponential growth mentioned in the text?
|
||||
What is the author discussing in this passage?
|
||||
What was the author's initial area of study?
|
||||
What is the idea behind the Trojan horse allegory mentioned in the text?
|
||||
What is the ultimate AI problem discussed in the text?
|
||||
What is the speaker doing while looking at the monitor?
|
||||
What does the author love?
|
||||
What is the speaker's reason for not going to Burning Man?
|
||||
What is the author's point of view on the idea of unification?
|
||||
What are the two main problems that need to be solved in robotics?
|
||||
What is the goal of the process mentioned in the text?
|
||||
What does the speaker say about the issues being discussed?
|
||||
What does the speaker like doing?
|
||||
Why shouldn't you go to bed any earlier?
|
||||
What is the human body compared to in the text?
|
||||
What is the comparison made between the trailer drivers and Uber drivers?
|
||||
What is the game that the speaker is referring to?
|
||||
What is the benefit of a process where it's good for the individual and good for the whole?
|
||||
What is the speaker's opinion on the meaning of life?
|
||||
What did the author fear the most about COVID?
|
||||
What is the difference between humans and non-human animals?
|
||||
What is the author's opinion on the potential for exponential growth in technology?
|
||||
What is the author discussing in this passage?
|
||||
What was the author's initial idea about programming languages?
|
||||
What are some possible explanations for why we haven't heard from extraterrestrial life?
|
||||
What is the 20 minute challenge?
|
||||
What is the author's opinion on the idea that machines can't have experience?
|
||||
What is the topic of the text?
|
||||
What is the speaker discussing in regards to numbers?
|
||||
What was the goal of the research mentioned in the text?
|
||||
What is the speaker's view of Russia?
|
||||
What is the benefit of using the code LEX PODCAST when downloading Cash App?
|
||||
Who did the speaker text before going on Tucker's show?
|
||||
What does the speaker urge people not to get into?
|
||||
What is the most compelling question to the speaker?
|
||||
What is the conversation the speaker had with Dan Carlin?
|
||||
What organization will receive a donation if you use the code LEXPODCAST on Cash App?
|
||||
What is the innate desire that humans have according to the text?
|
||||
What was the name of the first robot the speaker worked with?
|
||||
What is the speaker's opinion on the size of the list?
|
||||
What is the ethical question posed by the author?
|
||||
What does the author love about fighting?
|
||||
Who did the speaker and their partner go to for therapy?
|
||||
What does the author believe about the idea that technology is values agnostic?
|
||||
What is the beauty of music according to the speaker?
|
||||
What advice did the speaker give to students?
|
||||
What is the scientist's goal in sharing information about the science of sleep?
|
||||
What is the trend that the speaker sees when looking back at history?
|
||||
What is the speaker's opinion on the argument being discussed?
|
||||
What was the name of the popular forum that the speaker used to ask questions on?
|
||||
What is the topic of discussion in the given text?
|
||||
What technology does the speaker rely on for intuition?
|
||||
What was the speaker's profession and where did they work?
|
||||
What is the speaker's background that gives them an advantage as an ethnographer?
|
||||
What is the problem with the Olympics according to the text?
|
||||
What is the speaker excited about in the future?
|
||||
What topics are currently in the realm of philosophy?
|
||||
What is the big discovery of the principle mentioned in the text?
|
||||
What is the topic of the panel discussion that the speaker saw on YouTube?
|
||||
What is the best way to learn how to do something?
|
||||
What book was the speaker listening to while running?
|
||||
What is the speaker's opinion on building an AI that can detect nuanced language in different languages?
|
||||
What is the anonymous discussion feed for Yale campus?
|
||||
What is the speaker's opinion on the dark aspects of human nature?
|
||||
What are the names of the two startups mentioned in the text?
|
||||
What does the speaker do to expand their brain's capacity to predict more effectively?
|
||||
What is the book about that is being discussed?
|
||||
What is the topic of discussion in the given text?
|
||||
What game did the speaker hate playing in high school?
|
||||
What does the author think about the use of social media?
|
||||
What is the author discussing in this text?
|
||||
What is radar jamming?
|
||||
What is the author's perspective on human history?
|
||||
What is the speaker's opinion on human level intelligence?
|
||||
What is the speaker's concern about machine learning?
|
||||
What types of things can be found on Wikipedia according to the text?
|
||||
What was the name of the popular forum that the speaker used to ask questions on?
|
||||
What is the significance of the Winter War mentioned in the text?
|
||||
What is the author trying to say about our experiences?
|
||||
What is the author's opinion on the potential of Librex?
|
||||
What is the 'lockdown harm' referred to in the text?
|
||||
What is the open discussion that the author suggests we are still having?
|
||||
What is the advantage of technology according to the text?
|
||||
What is Dan Gable known for?
|
||||
What did the researchers discover during phase two of MAPS?
|
||||
What is the topic of discussion in the given text?
|
||||
What is the speaker's opinion on alien technology?
|
||||
What is the author's opinion on traveling faster than the speed of light?
|
||||
What is the topic of discussion in the given text?
|
||||
What is the benefit of using the code LEXPODCAST when downloading Cash App?
|
||||
What is the difference between when the speaker was talking to people after Deep Work and now, five years later?
|
||||
What does the author mean by 'skin in the game'?
|
||||
What is the speaker's initial fascination with math and physics?
|
||||
What advice would George give to a young person about life?
|
||||
According to the panpsychist, what is all there is?
|
||||
What is the focus of volume one of the book?
|
||||
What is the suggestion made by the speaker to solve the email problem?
|
||||
What is the speaker's opinion about the potential for their product to be useful?
|
||||
What are some possible explanations for why we haven't heard a big, loud signal from other intelligent life forms?
|
||||
What is the speaker referring to as an 'intractable problem'?
|
||||
What was the important thing to take into account when considering the size of the armies?
|
||||
What is the speaker's opinion on the importance of understanding a person's thinking and actions?
|
||||
What is the speaker's question regarding understanding something?
|
||||
What is the author's opinion on the ability of neural networks?
|
||||
What is the problem with the COVID virus?
|
||||
What is the speaker's profession or occupation?
|
||||
What are the names of the sponsors mentioned in the conversation?
|
||||
What is the purpose of science according to the speaker?
|
||||
What is one thing that the speaker mentions is missing in Alexa?
|
||||
What was the author studying and why?
|
||||
What was one of the really stressful parts of the situation?
|
||||
What is the speaker's opinion on Bitcoin as a mechanism for resisting authoritarianism?
|
||||
What is the speaker's fundamental belief about people?
|
||||
What is the example given in the text to explain a distributed algorithm?
|
||||
What kind of problems should you pick according to the speaker?
|
||||
What is the open scientific problem that the speaker is referring to?
|
||||
What is the author's opinion on the unexpected result?
|
||||
What was the speaker's reaction to the object they saw?
|
||||
What is ultimately ending COVID?
|
||||
What is the benefit of using ExpressVPN?
|
||||
What is the author's opinion on integrating compound semiconductors with silicon?
|
||||
What is the speaker going to talk about?
|
||||
What is the concept of complex exponentiation trying to capture?
|
||||
What was the reason for the speaker's need for medication?
|
||||
What does the author wonder about physicists and their ability to understand a phenomenon?
|
||||
What is the author's opinion on the trend of history?
|
||||
What is the difference between closed end problems and reading?
|
||||
What are the two things involved in creating a hypergraph?
|
||||
File diff suppressed because one or more lines are too long
@@ -330,7 +330,7 @@ class VectorStore(ABC):
|
||||
raise NotImplementedError
|
||||
|
||||
def as_retriever(self, **kwargs: Any) -> BaseRetriever:
|
||||
return VectorStoreRetriever(vectorstore=self, **kwargs)
|
||||
return VectorStoreRetriever(vectorstore=self, search_kwargs=kwargs)
|
||||
|
||||
|
||||
class VectorStoreRetriever(BaseRetriever, BaseModel):
|
||||
|
||||
Reference in New Issue
Block a user