RAG stands for Retrieval Augmented Generation.
It was introduced in the paper Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks.
Each step can be roughly broken down to:
- Retrieval - Seeking relevant information from a source given a query. For example, getting relevant passages of Wikipedia text from a database given a question.
- Augmented - Using the relevant retrieved information to modify an input to a generative model (e.g. an LLM).
- Generation - Generating an output given an input. For example, in the case of an LLM, generating a passage of text given an input prompt.
- LangChain
- LlamaIndex
- Without Any Pre Defined Framework
The Document Which We Are Using For This Apporach Can Be Downloaded From Below Mentioned Link https://openstax.org/details/books/concepts-biology
Getting The Outputs Like:
Prompt: "What is Hypothesis Testing?"
Response : Hypothesis testing is a statistical technique used to test a hypothesis about a population based on a sample of data. The basic idea is to use the sample data to make inferences about the population. There are several steps involved in hypothesis testing:
- Formulate a null hypothesis: This is a statement about the population that you want to test.
- Formulate an alternative hypothesis: This is a statement about the population that you want to reject the null hypothesis.
- Choose a test statistic: This is a statistical measure that you will use to determine whether the sample data supports the null or alternative hypothesis.
- Determine the critical region: This is the range of values of the test statistic that will lead to the rejection of the null hypothesis.
- Collect data: Collect a random sample of data from the population.
- Calculate the test statistic: Use the sample data to calculate the test statistic.
- Compare the test statistic to the critical value: If the test statistic is greater than the critical value, reject the null hypothesis. If the test statistic is less than or equal to the critical value, fail to reject the null hypothesis.