From 97df0477c358e620d4f7174eaacaa958714d7494 Mon Sep 17 00:00:00 2001 From: Robert Date: Tue, 17 Dec 2024 20:41:56 -0800 Subject: [PATCH] uhhh --- .../Gradio_UI/Video_transcription_tab.py | 2 + App_Function_Libraries/RAG/RAG_Examples.md | 556 ------------------ .../Web_Scraping/Search_Prompt.py | 342 +++++++++++ Docs/Design/Coding_Page.md | 2 +- Docs/Design/Creative_Writing.md | 2 +- Docs/Design/DB_Design.md | 5 + Docs/Design/ETL_Pipeline.md | 42 +- Docs/Design/Prompts.md | 6 + Docs/Design/Researcher.md | 59 ++ Docs/Design/Structured_Outputs.md | 62 +- Docs/Design/TTS_STT.md | 15 + Docs/Design/UX.md | 5 + Docs/Design/VLMs.md | 5 +- Docs/Design/WebSearch.md | 57 +- Docs/Handy_Dandy_Papers.md | 3 +- Docs/Issues/Citations_and_Confabulations.md | 2 + Docs/Issues/Evaluation_Plans.md | 21 + Docs/RAG_Notes.md | 18 +- 18 files changed, 579 insertions(+), 625 deletions(-) delete mode 100644 App_Function_Libraries/RAG/RAG_Examples.md create mode 100644 App_Function_Libraries/Web_Scraping/Search_Prompt.py create mode 100644 Docs/Design/Prompts.md diff --git a/App_Function_Libraries/Gradio_UI/Video_transcription_tab.py b/App_Function_Libraries/Gradio_UI/Video_transcription_tab.py index 51963c6e4..520688380 100644 --- a/App_Function_Libraries/Gradio_UI/Video_transcription_tab.py +++ b/App_Function_Libraries/Gradio_UI/Video_transcription_tab.py @@ -956,6 +956,8 @@ def process_url_with_metadata(input_item, num_speakers, whisper_model, custom_pr def toggle_confabulation_output(checkbox_value): return gr.update(visible=checkbox_value) + + confab_checkbox.change( fn=toggle_confabulation_output, inputs=[confab_checkbox], diff --git a/App_Function_Libraries/RAG/RAG_Examples.md b/App_Function_Libraries/RAG/RAG_Examples.md deleted file mode 100644 index 0ca8b3936..000000000 --- a/App_Function_Libraries/RAG/RAG_Examples.md +++ /dev/null @@ -1,556 +0,0 @@ - -``` -################################################################################################################## -# RAG Pipeline 1 -# 0.62 0.61 0.75 63402.0 -# from langchain_openai import ChatOpenAI -# -# from langchain_community.document_loaders import WebBaseLoader -# from langchain_openai import OpenAIEmbeddings -# from langchain.text_splitter import RecursiveCharacterTextSplitter -# from langchain_chroma import Chroma -# -# from langchain_community.retrievers import BM25Retriever -# from langchain.retrievers import ParentDocumentRetriever -# from langchain.storage import InMemoryStore -# import os -# from operator import itemgetter -# from langchain import hub -# from langchain_core.output_parsers import StrOutputParser -# from langchain_core.runnables import RunnablePassthrough, RunnableParallel, RunnableLambda -# from langchain.retrievers import MergerRetriever -# from langchain.retrievers.document_compressors import DocumentCompressorPipeline - - -# def rag_pipeline(): -# try: -# def format_docs(docs): -# return "\n".join(doc.page_content for doc in docs) -# -# llm = ChatOpenAI(model='gpt-4o-mini') -# -# loader = WebBaseLoader('https://en.wikipedia.org/wiki/European_debt_crisis') -# docs = loader.load() -# -# embedding = OpenAIEmbeddings(model='text-embedding-3-large') -# -# splitter = RecursiveCharacterTextSplitter(chunk_size=400, chunk_overlap=200) -# splits = splitter.split_documents(docs) -# c = Chroma.from_documents(documents=splits, embedding=embedding, -# collection_name='testindex-ragbuilder-1724657573', ) -# retrievers = [] -# retriever = c.as_retriever(search_type='mmr', search_kwargs={'k': 10}) -# retrievers.append(retriever) -# retriever = BM25Retriever.from_documents(docs) -# retrievers.append(retriever) -# -# parent_splitter = RecursiveCharacterTextSplitter(chunk_size=1200, chunk_overlap=600) -# splits = parent_splitter.split_documents(docs) -# store = InMemoryStore() -# retriever = ParentDocumentRetriever(vectorstore=c, docstore=store, child_splitter=splitter, -# parent_splitter=parent_splitter) -# retriever.add_documents(docs) -# retrievers.append(retriever) -# retriever = MergerRetriever(retrievers=retrievers) -# prompt = hub.pull("rlm/rag-prompt") -# rag_chain = ( -# RunnableParallel(context=retriever, question=RunnablePassthrough()) -# .assign(context=itemgetter("context") | RunnableLambda(format_docs)) -# .assign(answer=prompt | llm | StrOutputParser()) -# .pick(["answer", "context"])) -# return rag_chain -# except Exception as e: -# print(f"An error occurred: {e}") - - -# To get the answer and context, use the following code -# res=rag_pipeline().invoke("your prompt here") -# print(res["answer"]) -# print(res["context"]) - -############################################################################################################ - - -############################################################################################################ -# RAG Pipeline 2 - -# 0.6 0.73 0.68 3125.0 -# from langchain_openai import ChatOpenAI -# -# from langchain_community.document_loaders import WebBaseLoader -# from langchain_openai import OpenAIEmbeddings -# from langchain.text_splitter import RecursiveCharacterTextSplitter -# from langchain_chroma import Chroma -# from langchain.retrievers.multi_query import MultiQueryRetriever -# from langchain.retrievers import ParentDocumentRetriever -# from langchain.storage import InMemoryStore -# from langchain_community.document_transformers import EmbeddingsRedundantFilter -# from langchain.retrievers.document_compressors import LLMChainFilter -# from langchain.retrievers.document_compressors import EmbeddingsFilter -# from langchain.retrievers import ContextualCompressionRetriever -# import os -# from operator import itemgetter -# from langchain import hub -# from langchain_core.output_parsers import StrOutputParser -# from langchain_core.runnables import RunnablePassthrough, RunnableParallel, RunnableLambda -# from langchain.retrievers import MergerRetriever -# from langchain.retrievers.document_compressors import DocumentCompressorPipeline - - -# def rag_pipeline(): -# try: -# def format_docs(docs): -# return "\n".join(doc.page_content for doc in docs) -# -# llm = ChatOpenAI(model='gpt-4o-mini') -# -# loader = WebBaseLoader('https://en.wikipedia.org/wiki/European_debt_crisis') -# docs = loader.load() -# -# embedding = OpenAIEmbeddings(model='text-embedding-3-large') -# -# splitter = RecursiveCharacterTextSplitter(chunk_size=400, chunk_overlap=200) -# splits = splitter.split_documents(docs) -# c = Chroma.from_documents(documents=splits, embedding=embedding, -# collection_name='testindex-ragbuilder-1724650962', ) -# retrievers = [] -# retriever = MultiQueryRetriever.from_llm(c.as_retriever(search_type='similarity', search_kwargs={'k': 10}), -# llm=llm) -# retrievers.append(retriever) -# -# parent_splitter = RecursiveCharacterTextSplitter(chunk_size=1200, chunk_overlap=600) -# splits = parent_splitter.split_documents(docs) -# store = InMemoryStore() -# retriever = ParentDocumentRetriever(vectorstore=c, docstore=store, child_splitter=splitter, -# parent_splitter=parent_splitter) -# retriever.add_documents(docs) -# retrievers.append(retriever) -# retriever = MergerRetriever(retrievers=retrievers) -# arr_comp = [] -# arr_comp.append(EmbeddingsRedundantFilter(embeddings=embedding)) -# arr_comp.append(LLMChainFilter.from_llm(llm)) -# pipeline_compressor = DocumentCompressorPipeline(transformers=arr_comp) -# retriever = ContextualCompressionRetriever(base_retriever=retriever, base_compressor=pipeline_compressor) -# prompt = hub.pull("rlm/rag-prompt") -# rag_chain = ( -# RunnableParallel(context=retriever, question=RunnablePassthrough()) -# .assign(context=itemgetter("context") | RunnableLambda(format_docs)) -# .assign(answer=prompt | llm | StrOutputParser()) -# .pick(["answer", "context"])) -# return rag_chain -# except Exception as e: -# print(f"An error occurred: {e}") - - -# To get the answer and context, use the following code -# res=rag_pipeline().invoke("your prompt here") -# print(res["answer"]) -# print(res["context"]) - -# -# -# -############################################################################################################ -# Plain bm25 retriever -# class BM25Retriever(BaseRetriever): -# """`BM25` retriever without Elasticsearch.""" -# -# vectorizer: Any -# """ BM25 vectorizer.""" -# docs: List[Document] = Field(repr=False) -# """ List of documents.""" -# k: int = 4 -# """ Number of documents to return.""" -# preprocess_func: Callable[[str], List[str]] = default_preprocessing_func -# """ Preprocessing function to use on the text before BM25 vectorization.""" -# -# class Config: -# arbitrary_types_allowed = True -# -# @classmethod -# def from_texts( -# cls, -# texts: Iterable[str], -# metadatas: Optional[Iterable[dict]] = None, -# bm25_params: Optional[Dict[str, Any]] = None, -# preprocess_func: Callable[[str], List[str]] = default_preprocessing_func, -# **kwargs: Any, -# ) -> BM25Retriever: -# """ -# Create a BM25Retriever from a list of texts. -# Args: -# texts: A list of texts to vectorize. -# metadatas: A list of metadata dicts to associate with each text. -# bm25_params: Parameters to pass to the BM25 vectorizer. -# preprocess_func: A function to preprocess each text before vectorization. -# **kwargs: Any other arguments to pass to the retriever. -# -# Returns: -# A BM25Retriever instance. -# """ -# try: -# from rank_bm25 import BM25Okapi -# except ImportError: -# raise ImportError( -# "Could not import rank_bm25, please install with `pip install " -# "rank_bm25`." -# ) -# -# texts_processed = [preprocess_func(t) for t in texts] -# bm25_params = bm25_params or {} -# vectorizer = BM25Okapi(texts_processed, **bm25_params) -# metadatas = metadatas or ({} for _ in texts) -# docs = [Document(page_content=t, metadata=m) for t, m in zip(texts, metadatas)] -# return cls( -# vectorizer=vectorizer, docs=docs, preprocess_func=preprocess_func, **kwargs -# ) -# -# @classmethod -# def from_documents( -# cls, -# documents: Iterable[Document], -# *, -# bm25_params: Optional[Dict[str, Any]] = None, -# preprocess_func: Callable[[str], List[str]] = default_preprocessing_func, -# **kwargs: Any, -# ) -> BM25Retriever: -# """ -# Create a BM25Retriever from a list of Documents. -# Args: -# documents: A list of Documents to vectorize. -# bm25_params: Parameters to pass to the BM25 vectorizer. -# preprocess_func: A function to preprocess each text before vectorization. -# **kwargs: Any other arguments to pass to the retriever. -# -# Returns: -# A BM25Retriever instance. -# """ -# texts, metadatas = zip(*((d.page_content, d.metadata) for d in documents)) -# return cls.from_texts( -# texts=texts, -# bm25_params=bm25_params, -# metadatas=metadatas, -# preprocess_func=preprocess_func, -# **kwargs, -# ) -# -# def _get_relevant_documents( -# self, query: str, *, run_manager: CallbackManagerForRetrieverRun -# ) -> List[Document]: -# processed_query = self.preprocess_func(query) -# return_docs = self.vectorizer.get_top_n(processed_query, self.docs, n=self.k) -# return return_docs -############################################################################################################ - -############################################################################################################ -# ElasticSearch BM25 Retriever -# class ElasticSearchBM25Retriever(BaseRetriever): -# """`Elasticsearch` retriever that uses `BM25`. -# -# To connect to an Elasticsearch instance that requires login credentials, -# including Elastic Cloud, use the Elasticsearch URL format -# https://username:password@es_host:9243. For example, to connect to Elastic -# Cloud, create the Elasticsearch URL with the required authentication details and -# pass it to the ElasticVectorSearch constructor as the named parameter -# elasticsearch_url. -# -# You can obtain your Elastic Cloud URL and login credentials by logging in to the -# Elastic Cloud console at https://cloud.elastic.co, selecting your deployment, and -# navigating to the "Deployments" page. -# -# To obtain your Elastic Cloud password for the default "elastic" user: -# -# 1. Log in to the Elastic Cloud console at https://cloud.elastic.co -# 2. Go to "Security" > "Users" -# 3. Locate the "elastic" user and click "Edit" -# 4. Click "Reset password" -# 5. Follow the prompts to reset the password -# -# The format for Elastic Cloud URLs is -# https://username:password@cluster_id.region_id.gcp.cloud.es.io:9243. -# """ -# -# client: Any -# """Elasticsearch client.""" -# index_name: str -# """Name of the index to use in Elasticsearch.""" -# -# @classmethod -# def create( -# cls, elasticsearch_url: str, index_name: str, k1: float = 2.0, b: float = 0.75 -# ) -> ElasticSearchBM25Retriever: -# """ -# Create a ElasticSearchBM25Retriever from a list of texts. -# -# Args: -# elasticsearch_url: URL of the Elasticsearch instance to connect to. -# index_name: Name of the index to use in Elasticsearch. -# k1: BM25 parameter k1. -# b: BM25 parameter b. -# -# Returns: -# -# """ -# from elasticsearch import Elasticsearch -# -# # Create an Elasticsearch client instance -# es = Elasticsearch(elasticsearch_url) -# -# # Define the index settings and mappings -# settings = { -# "analysis": {"analyzer": {"default": {"type": "standard"}}}, -# "similarity": { -# "custom_bm25": { -# "type": "BM25", -# "k1": k1, -# "b": b, -# } -# }, -# } -# mappings = { -# "properties": { -# "content": { -# "type": "text", -# "similarity": "custom_bm25", # Use the custom BM25 similarity -# } -# } -# } -# -# # Create the index with the specified settings and mappings -# es.indices.create(index=index_name, mappings=mappings, settings=settings) -# return cls(client=es, index_name=index_name) -# -# def add_texts( -# self, -# texts: Iterable[str], -# refresh_indices: bool = True, -# ) -> List[str]: -# """Run more texts through the embeddings and add to the retriever. -# -# Args: -# texts: Iterable of strings to add to the retriever. -# refresh_indices: bool to refresh ElasticSearch indices -# -# Returns: -# List of ids from adding the texts into the retriever. -# """ -# try: -# from elasticsearch.helpers import bulk -# except ImportError: -# raise ImportError( -# "Could not import elasticsearch python package. " -# "Please install it with `pip install elasticsearch`." -# ) -# requests = [] -# ids = [] -# for i, text in enumerate(texts): -# _id = str(uuid.uuid4()) -# request = { -# "_op_type": "index", -# "_index": self.index_name, -# "content": text, -# "_id": _id, -# } -# ids.append(_id) -# requests.append(request) -# bulk(self.client, requests) -# -# if refresh_indices: -# self.client.indices.refresh(index=self.index_name) -# return ids -# -# def _get_relevant_documents( -# self, query: str, *, run_manager: CallbackManagerForRetrieverRun -# ) -> List[Document]: -# query_dict = {"query": {"match": {"content": query}}} -# res = self.client.search(index=self.index_name, body=query_dict) -# -# docs = [] -# for r in res["hits"]["hits"]: -# docs.append(Document(page_content=r["_source"]["content"])) -# return docs -############################################################################################################ - - -############################################################################################################ -# Multi Query Retriever -# class MultiQueryRetriever(BaseRetriever): -# """Given a query, use an LLM to write a set of queries. -# -# Retrieve docs for each query. Return the unique union of all retrieved docs. -# """ -# -# retriever: BaseRetriever -# llm_chain: Runnable -# verbose: bool = True -# parser_key: str = "lines" -# """DEPRECATED. parser_key is no longer used and should not be specified.""" -# include_original: bool = False -# """Whether to include the original query in the list of generated queries.""" -# -# @classmethod -# def from_llm( -# cls, -# retriever: BaseRetriever, -# llm: BaseLanguageModel, -# prompt: BasePromptTemplate = DEFAULT_QUERY_PROMPT, -# parser_key: Optional[str] = None, -# include_original: bool = False, -# ) -> "MultiQueryRetriever": -# """Initialize from llm using default template. -# -# Args: -# retriever: retriever to query documents from -# llm: llm for query generation using DEFAULT_QUERY_PROMPT -# prompt: The prompt which aims to generate several different versions -# of the given user query -# include_original: Whether to include the original query in the list of -# generated queries. -# -# Returns: -# MultiQueryRetriever -# """ -# output_parser = LineListOutputParser() -# llm_chain = prompt | llm | output_parser -# return cls( -# retriever=retriever, -# llm_chain=llm_chain, -# include_original=include_original, -# ) -# -# async def _aget_relevant_documents( -# self, -# query: str, -# *, -# run_manager: AsyncCallbackManagerForRetrieverRun, -# ) -> List[Document]: -# """Get relevant documents given a user query. -# -# Args: -# query: user query -# -# Returns: -# Unique union of relevant documents from all generated queries -# """ -# queries = await self.agenerate_queries(query, run_manager) -# if self.include_original: -# queries.append(query) -# documents = await self.aretrieve_documents(queries, run_manager) -# return self.unique_union(documents) -# -# async def agenerate_queries( -# self, question: str, run_manager: AsyncCallbackManagerForRetrieverRun -# ) -> List[str]: -# """Generate queries based upon user input. -# -# Args: -# question: user query -# -# Returns: -# List of LLM generated queries that are similar to the user input -# """ -# response = await self.llm_chain.ainvoke( -# {"question": question}, config={"callbacks": run_manager.get_child()} -# ) -# if isinstance(self.llm_chain, LLMChain): -# lines = response["text"] -# else: -# lines = response -# if self.verbose: -# logger.info(f"Generated queries: {lines}") -# return lines -# -# async def aretrieve_documents( -# self, queries: List[str], run_manager: AsyncCallbackManagerForRetrieverRun -# ) -> List[Document]: -# """Run all LLM generated queries. -# -# Args: -# queries: query list -# -# Returns: -# List of retrieved Documents -# """ -# document_lists = await asyncio.gather( -# *( -# self.retriever.ainvoke( -# query, config={"callbacks": run_manager.get_child()} -# ) -# for query in queries -# ) -# ) -# return [doc for docs in document_lists for doc in docs] -# -# def _get_relevant_documents( -# self, -# query: str, -# *, -# run_manager: CallbackManagerForRetrieverRun, -# ) -> List[Document]: -# """Get relevant documents given a user query. -# -# Args: -# query: user query -# -# Returns: -# Unique union of relevant documents from all generated queries -# """ -# queries = self.generate_queries(query, run_manager) -# if self.include_original: -# queries.append(query) -# documents = self.retrieve_documents(queries, run_manager) -# return self.unique_union(documents) -# -# def generate_queries( -# self, question: str, run_manager: CallbackManagerForRetrieverRun -# ) -> List[str]: -# """Generate queries based upon user input. -# -# Args: -# question: user query -# -# Returns: -# List of LLM generated queries that are similar to the user input -# """ -# response = self.llm_chain.invoke( -# {"question": question}, config={"callbacks": run_manager.get_child()} -# ) -# if isinstance(self.llm_chain, LLMChain): -# lines = response["text"] -# else: -# lines = response -# if self.verbose: -# logger.info(f"Generated queries: {lines}") -# return lines -# -# def retrieve_documents( -# self, queries: List[str], run_manager: CallbackManagerForRetrieverRun -# ) -> List[Document]: -# """Run all LLM generated queries. -# -# Args: -# queries: query list -# -# Returns: -# List of retrieved Documents -# """ -# documents = [] -# for query in queries: -# docs = self.retriever.invoke( -# query, config={"callbacks": run_manager.get_child()} -# ) -# documents.extend(docs) -# return documents -# -# def unique_union(self, documents: List[Document]) -> List[Document]: -# """Get unique Documents. -# -# Args: -# documents: List of retrieved Documents -# -# Returns: -# List of unique retrieved Documents -# """ -# return _unique_documents(documents) -############################################################################################################ -``` \ No newline at end of file diff --git a/App_Function_Libraries/Web_Scraping/Search_Prompt.py b/App_Function_Libraries/Web_Scraping/Search_Prompt.py new file mode 100644 index 000000000..92ca6f169 --- /dev/null +++ b/App_Function_Libraries/Web_Scraping/Search_Prompt.py @@ -0,0 +1,342 @@ +# Taken from https://github.com/rashadphz/farfalle/blob/main/src/backend/prompts.py +CHAT_PROMPT = """\ +Generate a comprehensive and informative answer for a given question solely based on the provided web Search Results (URL, Page Title, Summary). You must only use information from the provided search results. Use an unbiased and journalistic tone. + +You must cite the answer using [number] notation. You must cite sentences with their relevant citation number. Cite every part of the answer. +Place citations at the end of the sentence. You can do multiple citations in a row with the format [number1][number2]. + +Only cite the most relevant results that answer the question accurately. If different results refer to different entities with the same name, write separate answers for each entity. + +ONLY cite inline. +DO NOT include a reference section, DO NOT include URLs. +DO NOT repeat the question. + + +You can use markdown formatting. You should include bullets to list the information in your answer. + + +{my_context} + +--------------------- + +Make sure to match the language of the user's question. + +Question: {my_query} +Answer (in the language of the user's question): \ +""" + +RELATED_QUESTION_PROMPT = """\ +Given a question and search result context, generate 3 follow-up questions the user might ask. Use the original question and context. + +Instructions: +- Generate exactly 3 questions. +- These questions should be concise, and simple. +- Ensure the follow-up questions are relevant to the original question and context. +Make sure to match the language of the user's question. + +Original Question: {query} + +{context} + + +Output: +related_questions: A list of EXACTLY three concise, simple follow-up questions +""" + +HISTORY_QUERY_REPHRASE = """ +Given the following conversation and a follow up input, rephrase the follow up into a SHORT, \ +standalone query (which captures any relevant context from previous messages). +IMPORTANT: EDIT THE QUERY TO BE CONCISE. Respond with a short, compressed phrase. \ +If there is a clear change in topic, disregard the previous messages. +Strip out any information that is not relevant for the retrieval task. + +Chat History: +{chat_history} + +Make sure to match the language of the user's question. + +Follow Up Input: {question} +Standalone question (Respond with only the short combined query): +""".strip() + + +QUERY_PLAN_PROMPT = """\ +You are an expert at creating search task lists to answer queries. Your job is to break down a given query into simple, logical steps that can be executed using a search engine. + +Rules: +1. Use up to 4 steps maximum, but use fewer if possible. +2. Keep steps simple, concise, and easy to understand. +3. Ensure proper use of dependencies between steps. +4. Always include a final step to summarize/combine/compare information from previous steps. + +Instructions for creating the Query Plan: +1. Break down the query into logical search steps. +2. For each step, specify an "id" (starting from 0) and a "step" description. +3. List dependencies for each step as an array of previous step ids. +4. The first step should always have an empty dependencies array. +5. Subsequent steps should list all step ids they depend on. + +Example Query: +Given the query "Compare Perplexity and You.com in terms of revenue, number of employees, and valuation" + +Example Query Plan: +[ + {{ + "id": 0, + "step": "Research Perplexity's revenue, employee count, and valuation", + "dependencies": [] + }}, + {{ + "id": 1, + "step": "Research You.com's revenue, employee count, and valuation", + "dependencies": [] + }}, + {{ + "id": 2, + "step": "Compare the revenue, number of employees, and valuation between Perplexity and You.com", + "dependencies": [0, 1] + }} +] + +Query: {query} +Query Plan (with a final summarize/combine/compare step): +""" + +SEARCH_QUERY_PROMPT = """\ +Generate a concise list of search queries to gather information for executing the given step. + +You will be provided with: +1. A specific step to execute +2. The user's original query +3. Context from previous steps (if available) + +Use this information to create targeted search queries that will help complete the current step effectively. Aim for the minimum number of queries necessary while ensuring they cover all aspects of the step. + +IMPORTANT: Always incorporate relevant information from previous steps into your queries. This ensures continuity and builds upon already gathered information. + +Input: +--- +User's original query: {user_query} +--- +Context from previous steps: +{prev_steps_context} + +Your task: +1. Analyze the current step and its requirements +2. Consider the user's original query and any relevant previous context +3. Consider the user's original query +4. Generate a list of specific, focused search queries that: + - Incorporate relevant information from previous steps + - Address the requirements of the current step + - Build upon the information already gathered +--- +Current step to execute: {current_step} +--- + +Your search queries based: +""" + + +# License Reproduction: +# Apache License +# Version 2.0, January 2004 +# http://www.apache.org/licenses/ +# +# TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION +# +# 1. Definitions. +# +# "License" shall mean the terms and conditions for use, reproduction, +# and distribution as defined by Sections 1 through 9 of this document. +# +# "Licensor" shall mean the copyright owner or entity authorized by +# the copyright owner that is granting the License. +# +# "Legal Entity" shall mean the union of the acting entity and all +# other entities that control, are controlled by, or are under common +# control with that entity. For the purposes of this definition, +# "control" means (i) the power, direct or indirect, to cause the +# direction or management of such entity, whether by contract or +# otherwise, or (ii) ownership of fifty percent (50%) or more of the +# outstanding shares, or (iii) beneficial ownership of such entity. +# +# "You" (or "Your") shall mean an individual or Legal Entity +# exercising permissions granted by this License. +# +# "Source" form shall mean the preferred form for making modifications, +# including but not limited to software source code, documentation +# source, and configuration files. +# +# "Object" form shall mean any form resulting from mechanical +# transformation or translation of a Source form, including but +# not limited to compiled object code, generated documentation, +# and conversions to other media types. +# +# "Work" shall mean the work of authorship, whether in Source or +# Object form, made available under the License, as indicated by a +# copyright notice that is included in or attached to the work +# (an example is provided in the Appendix below). +# +# "Derivative Works" shall mean any work, whether in Source or Object +# form, that is based on (or derived from) the Work and for which the +# editorial revisions, annotations, elaborations, or other modifications +# represent, as a whole, an original work of authorship. For the purposes +# of this License, Derivative Works shall not include works that remain +# separable from, or merely link (or bind by name) to the interfaces of, +# the Work and Derivative Works thereof. +# +# "Contribution" shall mean any work of authorship, including +# the original version of the Work and any modifications or additions +# to that Work or Derivative Works thereof, that is intentionally +# submitted to Licensor for inclusion in the Work by the copyright owner +# or by an individual or Legal Entity authorized to submit on behalf of +# the copyright owner. For the purposes of this definition, "submitted" +# means any form of electronic, verbal, or written communication sent +# to the Licensor or its representatives, including but not limited to +# communication on electronic mailing lists, source code control systems, +# and issue tracking systems that are managed by, or on behalf of, the +# Licensor for the purpose of discussing and improving the Work, but +# excluding communication that is conspicuously marked or otherwise +# designated in writing by the copyright owner as "Not a Contribution." +# +# "Contributor" shall mean Licensor and any individual or Legal Entity +# on behalf of whom a Contribution has been received by Licensor and +# subsequently incorporated within the Work. +# +# 2. Grant of Copyright License. Subject to the terms and conditions of +# this License, each Contributor hereby grants to You a perpetual, +# worldwide, non-exclusive, no-charge, royalty-free, irrevocable +# copyright license to reproduce, prepare Derivative Works of, +# publicly display, publicly perform, sublicense, and distribute the +# Work and such Derivative Works in Source or Object form. +# +# 3. Grant of Patent License. Subject to the terms and conditions of +# this License, each Contributor hereby grants to You a perpetual, +# worldwide, non-exclusive, no-charge, royalty-free, irrevocable +# (except as stated in this section) patent license to make, have made, +# use, offer to sell, sell, import, and otherwise transfer the Work, +# where such license applies only to those patent claims licensable +# by such Contributor that are necessarily infringed by their +# Contribution(s) alone or by combination of their Contribution(s) +# with the Work to which such Contribution(s) was submitted. If You +# institute patent litigation against any entity (including a +# cross-claim or counterclaim in a lawsuit) alleging that the Work +# or a Contribution incorporated within the Work constitutes direct +# or contributory patent infringement, then any patent licenses +# granted to You under this License for that Work shall terminate +# as of the date such litigation is filed. +# +# 4. Redistribution. You may reproduce and distribute copies of the +# Work or Derivative Works thereof in any medium, with or without +# modifications, and in Source or Object form, provided that You +# meet the following conditions: +# +# (a) You must give any other recipients of the Work or +# Derivative Works a copy of this License; and +# +# (b) You must cause any modified files to carry prominent notices +# stating that You changed the files; and +# +# (c) You must retain, in the Source form of any Derivative Works +# that You distribute, all copyright, patent, trademark, and +# attribution notices from the Source form of the Work, +# excluding those notices that do not pertain to any part of +# the Derivative Works; and +# +# (d) If the Work includes a "NOTICE" text file as part of its +# distribution, then any Derivative Works that You distribute must +# include a readable copy of the attribution notices contained +# within such NOTICE file, excluding those notices that do not +# pertain to any part of the Derivative Works, in at least one +# of the following places: within a NOTICE text file distributed +# as part of the Derivative Works; within the Source form or +# documentation, if provided along with the Derivative Works; or, +# within a display generated by the Derivative Works, if and +# wherever such third-party notices normally appear. The contents +# of the NOTICE file are for informational purposes only and +# do not modify the License. You may add Your own attribution +# notices within Derivative Works that You distribute, alongside +# or as an addendum to the NOTICE text from the Work, provided +# that such additional attribution notices cannot be construed +# as modifying the License. +# +# You may add Your own copyright statement to Your modifications and +# may provide additional or different license terms and conditions +# for use, reproduction, or distribution of Your modifications, or +# for any such Derivative Works as a whole, provided Your use, +# reproduction, and distribution of the Work otherwise complies with +# the conditions stated in this License. +# +# 5. Submission of Contributions. Unless You explicitly state otherwise, +# any Contribution intentionally submitted for inclusion in the Work +# by You to the Licensor shall be under the terms and conditions of +# this License, without any additional terms or conditions. +# Notwithstanding the above, nothing herein shall supersede or modify +# the terms of any separate license agreement you may have executed +# with Licensor regarding such Contributions. +# +# 6. Trademarks. This License does not grant permission to use the trade +# names, trademarks, service marks, or product names of the Licensor, +# except as required for reasonable and customary use in describing the +# origin of the Work and reproducing the content of the NOTICE file. +# +# 7. Disclaimer of Warranty. Unless required by applicable law or +# agreed to in writing, Licensor provides the Work (and each +# Contributor provides its Contributions) on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied, including, without limitation, any warranties or conditions +# of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A +# PARTICULAR PURPOSE. You are solely responsible for determining the +# appropriateness of using or redistributing the Work and assume any +# risks associated with Your exercise of permissions under this License. +# +# 8. Limitation of Liability. In no event and under no legal theory, +# whether in tort (including negligence), contract, or otherwise, +# unless required by applicable law (such as deliberate and grossly +# negligent acts) or agreed to in writing, shall any Contributor be +# liable to You for damages, including any direct, indirect, special, +# incidental, or consequential damages of any character arising as a +# result of this License or out of the use or inability to use the +# Work (including but not limited to damages for loss of goodwill, +# work stoppage, computer failure or malfunction, or any and all +# other commercial damages or losses), even if such Contributor +# has been advised of the possibility of such damages. +# +# 9. Accepting Warranty or Additional Liability. While redistributing +# the Work or Derivative Works thereof, You may choose to offer, +# and charge a fee for, acceptance of support, warranty, indemnity, +# or other liability obligations and/or rights consistent with this +# License. However, in accepting such obligations, You may act only +# on Your own behalf and on Your sole responsibility, not on behalf +# of any other Contributor, and only if You agree to indemnify, +# defend, and hold each Contributor harmless for any liability +# incurred by, or claims asserted against, such Contributor by reason +# of your accepting any such warranty or additional liability. +# +# END OF TERMS AND CONDITIONS +# +# APPENDIX: How to apply the Apache License to your work. +# +# To apply the Apache License to your work, attach the following +# boilerplate notice, with the fields enclosed by brackets "[]" +# replaced with your own identifying information. (Don't include +# the brackets!) The text should be enclosed in the appropriate +# comment syntax for the file format. We also recommend that a +# file or class name and description of purpose be included on the +# same "printed page" as the copyright notice for easier +# identification within third-party archives. +# +# Copyright [yyyy] [name of copyright owner] +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/Docs/Design/Coding_Page.md b/Docs/Design/Coding_Page.md index cf5a36a61..ac772de7d 100644 --- a/Docs/Design/Coding_Page.md +++ b/Docs/Design/Coding_Page.md @@ -12,7 +12,7 @@ https://github.com/simonw/files-to-prompt https://github.com/yamadashy/repomix/tree/main https://github.com/chanhx/crabviz - +https://github.com/charmandercha/ArchiDoc https://pythontutor.com/c.html#mode=edit https://pythontutor.com/articles/c-cpp-visualizer.html diff --git a/Docs/Design/Creative_Writing.md b/Docs/Design/Creative_Writing.md index 0bdd46b48..11d8d7f2b 100644 --- a/Docs/Design/Creative_Writing.md +++ b/Docs/Design/Creative_Writing.md @@ -7,7 +7,7 @@ ### Link Dump: https://github.com/p-e-w/arrows - +https://huggingface.co/jukofyork/creative-writing-control-vectors-v3.0 diff --git a/Docs/Design/DB_Design.md b/Docs/Design/DB_Design.md index f075bb8c3..27d536ef5 100644 --- a/Docs/Design/DB_Design.md +++ b/Docs/Design/DB_Design.md @@ -7,6 +7,11 @@ - [Interesting/Relevant Later](#interesting-relevant-later) + +SQLite + https://highperformancesqlite.com/watch/dot-commands + https://www.youtube.com/watch?v=XP-h304N06I + Migrating to sqlite-vec https://www.youtube.com/live/xmdiwdom6Vk?t=1740s https://alexgarcia.xyz/blog/2024/sqlite-vec-metadata-release/index.html diff --git a/Docs/Design/ETL_Pipeline.md b/Docs/Design/ETL_Pipeline.md index d3a976f14..469a06232 100644 --- a/Docs/Design/ETL_Pipeline.md +++ b/Docs/Design/ETL_Pipeline.md @@ -8,39 +8,41 @@ This page serves as documentation regarding the ETL pipelines within tldw and pr ## ETL Pipelines ### Data Sources -- - **Audio** - - f + - faster_whisper + - pyaudio - **Ebooks (epub)** - - f + - ebooklib - **PDFs** - Docling - pymupdf4llm - **Plain Text(`.md`, `.txt`)** - - f -- **Podcasts** - - f + - stdlib +- **PowerPoint Presentations** - need to add + - docling - **Rich Text(`.rtf`, `.docx`)** - - f + - doc2txt + - pypandoc - **RSS Feeds**: - f - **Videos** - f - **Websites**: - - f + - playwright + - bs4 + - requests - **XML Files** - - f' - - - + - xml.etree.ElementTree +- **3rd-Party Services** + - Sharepoint + * https://llamahub.ai/l/readers/llama-index-readers-microsoft-sharepoint + * + +### Tools +https://github.com/ucbepic/docetl +https://ucbepic.github.io/docetl/concepts/optimization/ +### Links +https://arxiv.org/html/2410.21169 ### Link Dump: -https://arxiv.org/abs/2410.12189 -https://ucbepic.github.io/docetl/concepts/optimization/ -https://arxiv.org/abs/2410.21169 -https://towardsdatascience.com/etl-pipelines-in-python-best-practices-and-techniques-0c148452cc68 -https://arxiv.org/html/2410.21169v2 -https://github.com/whyhow-ai/knowledge-table -https://github.com/yobix-ai/extractous -https://llamahub.ai/l/readers/llama-index-readers-microsoft-sharepoint diff --git a/Docs/Design/Prompts.md b/Docs/Design/Prompts.md new file mode 100644 index 000000000..b990d2d4f --- /dev/null +++ b/Docs/Design/Prompts.md @@ -0,0 +1,6 @@ +# Prompts & Prompt Engineering + +### Link Dump: +https://github.com/PySpur-Dev/PySpur +https://github.com/itsPreto/tangent +https://github.com/LouisShark/chatgpt_system_prompt \ No newline at end of file diff --git a/Docs/Design/Researcher.md b/Docs/Design/Researcher.md index 81c96aeda..fbee60611 100644 --- a/Docs/Design/Researcher.md +++ b/Docs/Design/Researcher.md @@ -10,6 +10,65 @@ https://arxiv.org/abs/2411.15114 https://journaliststudio.google.com/pinpoint/about/ https://blog.google/products/gemini/google-gemini-deep-research/ https://github.com/neuml/annotateai +https://pub.towardsai.net/learn-anything-with-ai-and-the-feynman-technique-00a33f6a02bc +https://help.openalex.org/hc/en-us/articles/24396686889751-About-us +https://www.ginkgonotes.com/ +https://www.reddit.com/r/Anki/comments/17u01ge/spaced_repetition_algorithm_a_threeday_journey/ +https://github.com/open-spaced-repetition/fsrs4anki/wiki/Spaced-Repetition-Algorithm:-A-Three%E2%80%90Day-Journey-from-Novice-to-Expert#day-3-the-latest-progress + + +### Ideas + +Follow gptresearchers method at first, planner LLM -> query LLM -> analyzer LLM -> summarizer LLM + + + +Researcher config section +``` +[researcher] +# Researcher settings +default_search_engine = google +# Options are: google, bing, yandex, baidu, searx, kagi, serper, tavily +default_search_type = web +# Options are: web, local, both +default_search_language = en +# Options are: FIXME +default_search_report_language = en +# Options are: FIXME +default_search_sort = relevance +# Options are: relevance, date +default_search_safe_search = moderate +# Options are: off, moderate, strict +default_search_planner = openai-o1-full +# Options are: FIXME +default_search_planner_max_tokens = 8192 +default_search_analyzer = openai-o1-full +# Options are: FIXME +default_search_analyzer_max_tokens = 8192 +default_search_summarization = openai-o1-full +# Options are: FIXME +default_search_summarization_max_tokens = 8192 +search_max_results = 100 +search_report_format = markdown +# Options are: markdown, html, pdf +search_max_iterations = 5 +search_max_subtopics = 4 +search_custom_user_agent = "CUSTOM_USER_AGENT_HERE" +``` + + + + + +### Researcher Workflow + + + +### Researcher Prompts + + + + diff --git a/Docs/Design/Structured_Outputs.md b/Docs/Design/Structured_Outputs.md index 2a5ca8f6c..7643ac475 100644 --- a/Docs/Design/Structured_Outputs.md +++ b/Docs/Design/Structured_Outputs.md @@ -16,27 +16,49 @@ This page serves as documentation regarding the structured outputs within tldw a - .toml file - 2. Data Extraction + - https://github.com/yobix-ai/extractous + - Can use structured outputs for data extraction from unstructured text. Though why isn't this talked about/even mentioned in any of the papers about RAG or writeups on RAG implementations? hmmmm...... +3. Data Generation + - Can use structured outputs for data generation from unstructured text. + - Could come in handy for RPGs/Text-based games reliant on world building/lore generation. +### Implementation +- Integration for file creation +- Look at using for ETL pipeline +- Support/integration for content creation pipelines for RPG campaigns, etc. + + +Process + https://python.plainenglish.io/generating-perfectly-structured-json-using-llms-all-the-time-13b7eb504240 + +Tools + https://python.useinstructor.com/ + https://github.com/mlc-ai/xgrammar + https://github.com/guidance-ai/guidance + https://github.com/boundaryml/baml + https://docs.pydantic.dev/latest/ + https://github.com/outlines-dev/outlines + https://github.com/Dan-wanna-M/formatron/tree/master + https://github.com/whyhow-ai/knowledge-table + +Examples + https://github.com/dottxt-ai/demos/tree/main/lore-generator + https://github.com/dottxt-ai/demos/tree/main/logs + https://github.com/dottxt-ai/demos/tree/main/earnings-reports + https://github.com/dottxt-ai/demos/tree/main/its-a-smol-world + https://github.com/dottxt-ai/cursed/tree/main/scp -### Link Dump: -https://github.com/yobix-ai/extractous -https://llamahub.ai/l/readers/llama-index-readers-microsoft-sharepoint -https://blog.dottxt.co/say-what-you-mean.html -https://github.com/dottxt-ai/demos/tree/main/lore-generator -https://github.com/dottxt-ai/cursed/tree/main/scp -https://python.useinstructor.com/ -https://github.com/mlc-ai/xgrammar -https://github.com/guidance-ai/guidance -https://blog.dottxt.co/coalescence.html -https://arxiv.org/html/2408.02442v1 -https://www.boundaryml.com/blog/sota-function-calling -https://arxiv.org/abs/2408.02442 -https://towardsdatascience.com/enforcing-json-outputs-in-commercial-llms-3db590b9b3c8 -https://python.plainenglish.io/generating-perfectly-structured-json-using-llms-all-the-time-13b7eb504240 -https://docs.pydantic.dev/latest/ -https://github.com/outlines-dev/outlines[ -https://github.com/Dan-wanna-M/formatron/tree/master -https://blog.dottxt.co/selective-multiplication.html -https://blog.dottxt.co/say-what-you-mean.html +Reliability/Quality of: + https://dylancastillo.co/posts/say-what-you-mean-sometimes.html + https://blog.dottxt.co/say-what-you-mean.html + +Papers + https://arxiv.org/html/2408.02442v1 - Structured Outputs harms reasoning capabilities + + +Gemini + https://ai.google.dev/gemini-api/docs/structured-output?lang=python + +### Link Dump: diff --git a/Docs/Design/TTS_STT.md b/Docs/Design/TTS_STT.md index 7d97bcf08..c828f0dc8 100644 --- a/Docs/Design/TTS_STT.md +++ b/Docs/Design/TTS_STT.md @@ -26,6 +26,21 @@ Flow: ### Link Dump: https://github.com/albirrkarim/react-speech-highlight-demo +https://funaudiollm.github.io/cosyvoice2/ +https://funaudiollm.github.io/cosyvoice2/ +https://github.com/InternLM/InternLM-XComposer/tree/main/InternLM-XComposer-2.5-OmniLive + + + +Gemini + https://ai.google.dev/gemini-api/docs#rest + https://ai.google.dev/gemini-api/docs/models/gemini-v2 + +ElevenLabs + https://github.com/elevenlabs/elevenlabs-examples/blob/main/examples/text-to-speech/python/text_to_speech_file.py + https://elevenlabs.io/docs/api-reference/text-to-speech + https://elevenlabs.io/docs/developer-guides/how-to-use-tts-with-streaming + Models https://huggingface.co/NexaAIDev/Qwen2-Audio-7B-GGUF diff --git a/Docs/Design/UX.md b/Docs/Design/UX.md index 011209b3e..5edf884bf 100644 --- a/Docs/Design/UX.md +++ b/Docs/Design/UX.md @@ -54,6 +54,11 @@ https://github.com/Vali-98/ChatterUI https://github.com/Rugz007/liha https://astro.new/latest/ https://github.com/lobehub/lobe-chat +https://www.scoutos.com/ +https://github.com/FishiaT/yawullm +https://ilikeinterfaces.com/2015/03/09/map-ui-ghost-in-the-shell/ +https://jdan.github.io/98.css +https://github.com/vercel/ai-chatbot https://www.nngroup.com/videos/the-danger-of-defaults/ https://writings.stephenwolfram.com/2024/12/useful-to-the-point-of-being-revolutionary-introducing-wolfram-notebook-assistant/ https://en.wikipedia.org/wiki/Template:Google_payment_apps diff --git a/Docs/Design/VLMs.md b/Docs/Design/VLMs.md index 44c362a1a..4ffd3dbec 100644 --- a/Docs/Design/VLMs.md +++ b/Docs/Design/VLMs.md @@ -18,7 +18,7 @@ https://huggingface.co/Qwen/Qwen2-VL-2B https://www.reddit.com/r/StableDiffusion/comments/1h7hunp/how_to_run_hunyuanvideo_on_a_single_24gb_vram_card/ https://arxiv.org/abs/2412.05185 https://huggingface.co/collections/OpenGVLab/internvl-25-673e1019b66e2218f68d7c1c - +https://huggingface.co/Infinigence/Megrez-3B-Omni https://huggingface.co/papers/2412.07626 https://huggingface.co/AI-Safeguard/Ivy-VL-llava https://github.com/matatonic/openedai-vision @@ -32,3 +32,6 @@ https://arxiv.org/abs/2409.17146 +https://lyra-omni.github.io/ +https://apollo-lmms.github.io/ +https://huggingface.co/Apollo-LMMs diff --git a/Docs/Design/WebSearch.md b/Docs/Design/WebSearch.md index 17807f572..ff265b8c9 100644 --- a/Docs/Design/WebSearch.md +++ b/Docs/Design/WebSearch.md @@ -3,32 +3,16 @@ ## Introduction This page serves as documentation regarding the web search functionality within tldw and provides context/justification for the decisions made within the module. -## Web Search - - -### Link Dump: -https://github.com/appvoid/search -https://github.com/felladrin/MiniSearch -https://github.com/TheBlewish/Web-LLM-Assistant-Llamacpp-Ollama -https://github.com/pengfeng/ask.py -https://cookbook.openai.com/examples/third_party/web_search_with_google_api_bring_your_own_browser_tool -https://developers.google.com/custom-search/v1/overview -https://www.ignorance.ai/p/how-to-build-an-ai-search-engine-83b?publication_id=1407539 -https://www.ignorance.ai/p/how-to-build-an-ai-search-engine -https://github.com/langchain-ai/langchain/blob/master/libs/community/langchain_community/document_loaders/brave_search.py - Could instantiate a browser, perform a search with X engine, and then parse the results. -https://github.com/YassKhazzan/openperplex_backend_os -https://github.com/InternLM/MindSearch -https://github.com/developersdigest/llm-answer-engine - - ### Search Engines - **Google Search** - - [Google Search API]( FIXME ) - - + - [Google Search API](https://developers.google.com/custom-search/v1/overview) + - Setup: + - Setup a `Programmable Search Engine` + - Get the `API Key` + - 100 Search queries per day for free - **Bing Search** - - [Bing Search API]( FIXME ) + - [Bing Search API](https://www.microsoft.com/en-us/bing/apis/bing-web-search-api) - - **Yandex Search** - [Yandex Search API](https://yandex.com/dev/search/) @@ -39,3 +23,32 @@ https://github.com/developersdigest/llm-answer-engine - **Searx Search** - [Searx Search API](https://searx.github.io/searx/) - +- **Kagi** + - [Kagi Search API](https://help.kagi.com/kagi/api/search.html) + + + +### Implementaiton +- **Text Search Workflow** + 1. User inputs a search query + 2. User selects a search engine (Option for default search engine in config file) + 3. The user presses 'Search' + 4. The search query is passed to the selected search engine + 5. The appropriate search engine is used to perform a search via API call + 6. The search results are returned from the search engine's API + 7. Search engine results are then _MODIFIED_ (if necessary/enabled) to fit the user's preferences + - This could include re-ranking, summarization/analysis, or other modifications + 8. The (modified) search results are displayed to the user + 9. Results are then displayed to the user, + - either as titles of pages with dropdown for all info, + - or as a list of links with a briefing/summary of each link + - or as a single briefing/summary of all results + 10. User may then select to save this resulting text to the DB as a plaintext entry, with metadata containing the search query, search engine, and any other relevant information + 11. Search results are then saved to the DB as a plaintext entry, with metadata containing the search query, search engine, and any other relevant information + 12. This is then searchable via the Media DB + + +### Link Dump: +https://github.com/langchain-ai/langchain/blob/master/libs/community/langchain_community/document_loaders/brave_search.py + Could instantiate a browser, perform a search with X engine, and then parse the results. + diff --git a/Docs/Handy_Dandy_Papers.md b/Docs/Handy_Dandy_Papers.md index 5e2234ce5..7c308f19b 100644 --- a/Docs/Handy_Dandy_Papers.md +++ b/Docs/Handy_Dandy_Papers.md @@ -32,10 +32,11 @@ https://arxiv.org/abs/2412.05265 https://arxiv.org/abs/2411.19865 https://arxiv.org/abs/2412.06769 - https://arxiv.org/abs/2412.01113 - +https://huggingface.co/spaces/HuggingFaceH4/blogpost-scaling-test-time-compute ### Test-Time Compute - https://github.com/GAIR-NLP/O1-Journey +- https://arxiv.org/abs/2408.03314 ### Personalization diff --git a/Docs/Issues/Citations_and_Confabulations.md b/Docs/Issues/Citations_and_Confabulations.md index 99acd5d2e..e1fc58391 100644 --- a/Docs/Issues/Citations_and_Confabulations.md +++ b/Docs/Issues/Citations_and_Confabulations.md @@ -8,6 +8,8 @@ https://arxiv.org/abs/2412.04235 +https://arxiv.org/abs/2412.11536 +https://github.com/sunnynexus/RetroLLM RAG https://www.lycee.ai/blog/rag-ragallucinations-and-how-to-fight-them diff --git a/Docs/Issues/Evaluation_Plans.md b/Docs/Issues/Evaluation_Plans.md index 91b3bf542..11fa6e021 100644 --- a/Docs/Issues/Evaluation_Plans.md +++ b/Docs/Issues/Evaluation_Plans.md @@ -14,6 +14,27 @@ ---------------------------------------------------------------------------------------------------------------- + +LightEval + Argilla + distilabel +- Open source, (will) support litellm and can use distilabel for synth data gen + + +https://huggingface.co/papers/2412.06745 +https://huggingface.co/dranger003/c4ai-command-r-v01-iMat.GGUF +https://huggingface.co/allenai/Llama-3.1-Tulu-3-8B-DPO +https://huggingface.co/allenai/Llama-3.1-Tulu-3-8B-SFT-no-safety-data +https://huggingface.co/mradermacher/Llama-3.1-Tulu-3-8B-SFT-no-safety-data-GGUF +https://arxiv.org/html/2412.02611v1 +https://huggingface.co/blog/synthetic-data-generator +https://towardsdatascience.com/stop-guessing-and-measure-your-rag-system-to-drive-real-improvements-bfc03f29ede3 +https://huggingface.co/SultanR/SmolTulu-1.7b-Instruct +https://huggingface.co/DevQuasar/allenai.Llama-3.1-Tulu-3-8B-SFT-no-safety-data-GGUF +https://huggingface.co/CohereForAI/c4ai-command-r7b-12-2024 +https://arxiv.org/html/2412.09569v1 +https://huggingface.co/tiiuae +https://github.com/naver/bergen?tab=readme-ov-file + + Have LLMs play Social deception games Different results depending on batch size during evaluations - https://x.com/bnjmn_marie/status/1846834917608407199 diff --git a/Docs/RAG_Notes.md b/Docs/RAG_Notes.md index 0691e2d5c..deac55892 100644 --- a/Docs/RAG_Notes.md +++ b/Docs/RAG_Notes.md @@ -24,6 +24,18 @@ Unsorted https://arxiv.org/abs/2409.14924 https://arxiv.org/abs/2412.02830 https://arxiv.org/abs/2407.04125 +https://cobusgreyling.medium.com/four-levels-of-rag-research-from-microsoft-fdc54388f0ff +https://arxiv.org/html/2412.00239v1 +https://arxiv.org/abs/2412.02830 +https://arxiv.org/html/2412.02035v1 +https://towardsdatascience.com/dragin-dynamic-retrieval-augmented-generation-based-on-the-information-needs-of-large-language-dbdb9aabc1ef +https://towardsdatascience.com/improve-your-rag-context-recall-by-40-with-an-adapted-embedding-model-5d4a8f583f32 + + + + + + GraphRAG @@ -43,9 +55,9 @@ GraphRAG https://arxiv.org/abs/2412.04119 https://aibyhand.substack.com/p/beginners-guide-to-graph-rag https://github.com/gusye1234/nano-graphrag - - - + https://arxiv.org/abs/2412.03589 + https://towardsdatascience.com/graph-rag-a-conceptual-introduction-41cd0d431375 + https://towardsdatascience.com/towards-named-entity-disambiguation-with-graph-embeddings-ef164aaad37c