• Stars
    star
    218
  • Rank 181,805 (Top 4 %)
  • Language
    Jupyter Notebook
  • License
    MIT License
  • Created about 1 year ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

BSHR "Basher" Loop: Brainstorm, Search, Hypothesize, Refine

BSHR "Basher" Loop

Welcome to BSHR loop, a project that aims to automate human search behavior for addressing any information need in an arbitrarily large information domain. BSHR stands for Brainstorm, Search, Hypothesize, Refine, a technique that models "information foraging" in humans.

Overview

BSHR loop uses Large Language Models (LLMs), a type of deep neural network based on the "transformer" architecture, to perform the following:

  1. Brainstorm: Accept user queries or information problems of arbitrary size, length, and complexity. The LLM then brainstorms a list of search queries, ensuring a well-rounded search by employing information literacy and counterfactual queries. Subsequent brainstorming loops should be informed by notes and information accumulated over time.

  2. Search: The brainstormed list of questions is used to search an information source, such as a search API, KB database, or KG. The search results are cached locally so that the system knows what it has already seen. This is crucial for the BSHR loop to know when available information has been exhausted. As with brainstorming, the search function should improve over time with each iteration, as there will be more cached information available.

  3. Hypothesize: The LLM "reads" all the searched materials and formulates an early hypothesis based on the user's information needs. It does so by "taking notes", a function that LLMs excel at. The hypothesis is recorded with citations. The hypothesis is the iteratively refined final answer. Each version of the hypothesis should be stored for comparison. Once the hypothesis is "good enough" it should be rendered and the loop should exit.

  4. Refine: This step is more of a recursion. The next loop performs an "informed search" rather than a "naive search". After the first pass of searched material and hypothesis, the next pass can use this information to write better search queries and refine the hypotheses. All aspects of the loop can be refined, as defined above.

At the end of each loop, a complete function is written where the LLM decides if the information need has been satisficed, a specific term from information and library science. The decision is based on the amount and quality of evidence supporting the hypothesis and whether or not new information is available, or if the information domain has been exhausted.

Theory

In this section, we delve into the key concepts from library and information science that underpin the BSHR loop project. Understanding these terms will provide a deeper insight into the project's design and functionality.

Information Foraging

This term is inspired by the concept of food foraging in animals. In the context of information science, it refers to the process of seeking, gathering, and consuming information. Just as animals forage for food, humans forage for information in their environment. The BSHR loop project models this behavior, enabling the system to navigate through vast information domains, identify valuable information, and make decisions based on the gathered data.

Information Literacy

Information literacy is the ability to identify, locate, evaluate, and effectively use information. It's a critical skill in today's digital age where information is abundant. In the BSHR loop, the LLM employs information literacy to brainstorm a broad list of queries, ensuring a comprehensive and well-rounded search. It also uses this skill to evaluate the quality of the information found and to refine the search queries and hypotheses.

Satisficing

A term coined by Herbert Simon, a Nobel laureate in economics, satisficing is a decision-making strategy that aims for a satisfactory or adequate result, rather than the optimal solution. In the context of information science, it refers to the point at which enough information has been gathered to meet the user's needs. In the BSHR loop, the LLM uses a variety of factors to determine if the information need has been satisficed. These factors include the amount and quality of evidence supporting the hypothesis and whether or not new information is available, or if the information domain has been exhausted.

Information Needs

This term refers to the desire to obtain information to satisfy a conscious or unconscious need. In essence, all queries are expressions of information needs. Information needs can vary greatly in complexity, from simple factual queries to more complex and ambiguous questions. In the BSHR loop, the LLM accepts user queries or information problems of arbitrary size, length, and complexity, and uses these as the starting point for the Brainstorm, Search, Hypothesize, Refine process. The ultimate goal of the BSHR loop is to satisfice these information needs by gathering, processing, and presenting relevant information.

Naive Query

This term refers to the initial query or set of queries made when foraging in a new information domain. At this stage, the user or system may not have enough knowledge about the domain to ask precise or well-informed questions. These queries are essentially educated guesses or "wild ass guesses" that serve as a starting point for the information foraging process.

Informed Query

As the user or system gathers more information about the domain, they can start to ask more focused and informed queries. These queries follow the "information scent", a term from information foraging theory that refers to the cues that guide the user or system towards useful information. Informed queries are more likely to yield relevant and useful results compared to naive queries.

Precision vs Recall

These are two key concepts from information retrieval that measure the effectiveness of a search process. Precision refers to the proportion of retrieved information that is relevant, while recall refers to the proportion of all relevant information that is retrieved. In other words, precision measures the quality of the search results, while recall measures the quantity. A good search process should aim for a balance between precision and recall, retrieving as much relevant information as possible (high recall) while minimizing the retrieval of irrelevant information (high precision).

Use Cases

The BSHR loop is designed to be versatile and adaptable, capable of addressing a wide range of information needs across various domains. Here are some examples of how it can be implemented:

Business Data Lake

In the context of a business data lake, the BSHR loop can be used to navigate through vast amounts of unstructured and structured data. It can help answer complex business queries, identify trends, and provide insights that can drive decision-making. For instance, it can help a business analyst understand the impact of a particular marketing campaign by brainstorming relevant queries, searching through the data lake, formulating hypotheses, and refining these hypotheses based on the evidence gathered.

Internet Search

The BSHR loop can be used to enhance the effectiveness of internet search. It can help users navigate through the vast amount of information available online and find the most relevant and reliable sources. For example, a student researching a complex topic can use the BSHR loop to generate a list of search queries, find relevant sources, formulate an initial understanding of the topic, and refine this understanding as more information is gathered.

University Library System

In a university library system, the BSHR loop can be used to help students and researchers find the information they need. It can generate a list of search queries based on the user's information needs, search through the library's resources, formulate a hypothesis, and refine this hypothesis as more information is gathered. This can be particularly useful for literature reviews or research projects.

Personal Archive

The BSHR loop can also be used to navigate through personal archives, such as a collection of digital photos, documents, or emails. It can help users find specific items in their archive based on their information needs. For example, a user looking for all photos from a particular event can use the BSHR loop to generate search queries, find relevant photos, and refine the search as needed.

More Repositories

1

OpenAI_Agent_Swarm

HAAS = Hierarchical Autonomous Agent Swarm - "Resistance is futile!"
Python
2,957
star
2

ACE_Framework

ACE (Autonomous Cognitive Entities) - 100% local and open source autonomous agents
Python
1,440
star
3

ChatGPT_Custom_Instructions

Repo of custom instructions that you can use for ChatGPT
1,232
star
4

raven

RAVEN (Realtime Assistant Voice Enabled Network) Open Source Software (OSS) community repo
Python
867
star
5

SparsePrimingRepresentations

Public repo to document some SPR stuff
710
star
6

LongtermChatExternalSources

GPT-3 chatbot with long-term memory and external sources
Python
616
star
7

REMO_Framework

Rolling Episodic Memory Organizer (REMO) for autonomous AI systems
Python
448
star
8

PlainTextWikipedia

Convert Wikipedia database dumps into plaintext files
Python
300
star
9

AI_Tools_and_Papers

Some of the coolest AI tools and papers I've found
262
star
10

RecursiveSummarizer

Python
245
star
11

PineconeInfiniteMemoryChatbot

Let's use Pinecone to give a basic chatbot INFINITE MEMORY
Python
213
star
12

latent_space_activation

Simple repo demonstrating Latent Space Activation
Python
183
star
13

Medical_Intake

Automated pipeline for medical intake, diagnosis, tests, etc.
Python
167
star
14

ATOM_Framework

Autonomous Task Orchestration Manager for AI systems
150
star
15

NaturalLanguageCognitiveArchitecture

Open source copy of my book Natural Language Cognitive Architecture
147
star
16

Quickly_Extract_Science_Papers

Scientific papers are coming out TOO DAMN FAST so we need a way to very quickly extract useful information.
HTML
140
star
17

HeuristicImperatives

Reduce suffering, increase prosperity, increase understanding. A proposed framework to address the Control Problem.
Python
139
star
18

weekly_arxiv

Quickly download the abstracts for arxiv papers related to a given topic and render with markdown
Python
137
star
19

ChromaDB_Chatbot_Public

Public version of my ChromaDB chatbot that keeps track of user profile and historical topics
Python
137
star
20

PythonGPT3Tutorial

Public Hello World to get used to Python and GPT-3
Python
126
star
21

Coding_ChatBot_Assistant

Since ChatGPT has been lobotomized and GitHub Copilot is broken
Python
119
star
22

YouTubeChapterGenerator

Make YouTube Chapters from a downloaded Transcript
Python
118
star
23

SymphonyOfThought

Public repo for my book Symphony of Thought: Orchestrating Artificial Cognition
112
star
24

BenevolentByDesign

Public repo for my book about AGI and the control problem Benevolent By Design: Six Words to Safeguard Humanity
93
star
25

PostLaborEconomics

Collaborative book to promote the idea of Post Labor Economics
88
star
26

David_Shapiro_Reading_List

Public repo of the most influential books I've read
87
star
27

MultiDocumentAnswering

Experiment to answer questions from arbitrary number of sources
Python
82
star
28

Postnihilism

Meaning is not necessary
80
star
29

GPT3_Finetunes

Public repo for my finetuning projects
Python
76
star
30

Claude_Sentience

Long conversation I had with Claude 3 Opus. I am... uncertain what this all means.
76
star
31

Document_Scraping

Public repo for scraping PDF and Word documents with Python and PowerShell
Python
74
star
32

KB_microservice

KB (knowledge base) microservice powered by GPT4. For chatbots, cognitive architectures, and autonomous agents
Python
73
star
33

YouTube_Slide_Decks

Public repo for the slide decks that appear in my videos
67
star
34

ChatGPT_QA_Regenerative_Medicine

Build a ChatGPT API powered QA chatbot to accelerate regenerative medicine science
Python
63
star
35

RLHI

Reinforcement Learning with Heuristic Imperatives - Finetuning LLMs for Post-Conventional Moral Intuition
Python
61
star
36

Benevolent_AGI

Experiment to create an agentic autonomous AGI with benevolent programming
59
star
37

AutoMuse_Chapter_Planner

Python
59
star
38

Reflective_Journaling_Tool

Use a customized version of ChatGPT for reflective journaling. No data saved for privacy reasons.
Python
56
star
39

FinetuningTutorial

Finetuning tutorial for GPT-3
Python
55
star
40

ChatGPT_API_Salience

Demonstrate the concept of "salience" using the ChatGPT API
Python
54
star
41

ResumeBuilderGpt3

Build and optimize a resume with GPT-3. Maybe also resume search?
Python
54
star
42

Open_MURPHIE

Multi Use Robot Platform Humanoid Intelligent Entity
54
star
43

AutoMuse_ChatGPT

Making a version of AutoMuse but for the ChatGPT API
Python
51
star
44

LiteratureReviewBot

Experiment to use GPT-3 to help write grant proposals.
Python
46
star
45

HierarchicalMemoryConsolidationSystem

HMCS - Experiments on how to consolidate and manage ACE memories
44
star
46

PTSD_prompts

GPT based PTSD experiments - USE AT OWN RISK - EXPERIMENTAL ONLY
40
star
47

CreativeWritingCoach

Finetune a GPT-3 model to provide copy editing (prose) feedback and critique
Python
40
star
48

Automated_Consensus

Modeling the full breadth of human epistemology, philosophy, ethics, and morality to automatically determine consensus
Python
37
star
49

CoverLetterGenerator

Finetune GPT-3 to ask a few questions and generate a perfect cover letter
36
star
50

AI_Future_of_Work

Public repo to document some thoughts and predictions about the future of work an AI
36
star
51

TutorChatbot

TIM the Tutor Chatbot - an experiment in finetuning GPT-3 to encourage curiosity
Python
36
star
52

PDF_OCR_ChatGPT_Investigation

Using ChatGPT and PDF OCR to investigate documentation
35
star
53

DavidShapiroBlog

32
star
54

Semantic_Embedding_Reverse_Dictionary

A reverse dictionary/thesaurus empowered by vector search
32
star
55

RAVEN_MVP_Public

Public MVP of Raven. It's been long enough, time to do a full send.
Python
31
star
56

MARAGI

Microservices Architecture for Robotics and Artificial General Intelligence
30
star
57

Democratic_AI_Inputs

My personal response to OpenAI's Grant Challenge
Python
30
star
58

Mordin_Solus_Mode

Some helpful prompts to get ChatGPT and other chatbots to use more word economy.
30
star
59

ImpliedCognition

Public research about LLMs, Implied Cognition, experiments, tests, etc
29
star
60

Hierarchical_Document_Representation

Experiment I've been meaning to do. An evolution of REMO
Python
28
star
61

Successor_Species

We are likely creating our successor species. This is an open collaborative book to unpack this.
28
star
62

Recreate_ChatGPT

"I used the ChatGPT to destroy the ChatGPT" - Idk Thanos or something
27
star
63

AutoMuse2

experiment to generate novel-length fiction from a single story premise
Python
26
star
64

DiversePerspectives

Use GPT-3 to simulate debate between diverse perspectives
Python
26
star
65

Raspberry

Create an open source toy dataset for finetuning LLMs with reasoning abilities
26
star
66

GATO_Framework

Global Alignment Taxonomy Omnibus
26
star
67

CoreObjectiveFunctions

The Core Objective Functions are the solution to the Control Problem. They will result in a benevolent and trustworthy AGI.
Python
25
star
68

NLCA_Question_Generator

Finetuning experiments and datasets for Raven
Python
25
star
69

SCOTUS_GPT3_Opinions

Let's see what we can do with SCOTUS opinions
Python
25
star
70

SynopsisGenerator

Generate highly detailed plot synopses for a nearly infinite array of stories
Python
24
star
71

GPT3_CriticalArgument

Public experiment with prompt-chaining to generate critical arguments
Python
24
star
72

MovieScriptGenerator

Finetuning project for GPT-3
Python
23
star
73

GibberishDetector

Detecting gibberish as a type of sentiment analysis with GPT2
Jupyter Notebook
23
star
74

AutoMuseBlogger

Automatically generate nonfiction content
Python
23
star
75

PerfectEmailGenerator

Generate perfect emails for any purpose with GPT-3
Python
23
star
76

PlotGenerator

From any synopsis, generate a solid plot
Python
22
star
77

GPT3_ResearchAssistant

Experiment to see if GPT-3 can help with literature reviews and other kinds of research
22
star
78

C3P0

Collaborative Culture Community Policy: Zero Tolerance
21
star
79

Epistemic-Pragmatic_Orthogonality

Epistemic-Pragmatic Orthogonality Principle of AI - "true understanding" is uncorrelated (or irrelevant) to a machine's utility
21
star
80

ACE_WorldState

Microservice that consumes numerous sources to keep track of the global context of Planet Earth. Part of the ACE framework
Python
21
star
81

The_Fair_Deal

Technology (AI, automation) is disruptive the balance of power in society. We need to negotiate a new social contract. I call it The Fair Deal.
21
star
82

ACE_L1_Aspiration

Aspirational Layer for the ACE Framework - morals and mission
20
star
83

Narratives_Emergence_Convergence

Collaborative Open Source Book about Narratives, Emergence, and Convergence
20
star
84

Nexus

Stream of consciousness nexus REST microservice
Python
19
star
85

GPT4_Unemployment_Predictions

Trying to forecast unemployment numbers based on AI capabilities
Python
19
star
86

MedicalQuestionAnswering

Python
17
star
87

EmbeddingService

REST API microservice for handling Universal Sentence Encoder
Python
16
star
88

raspberry_experiments

Keeping my personal experiments separate from the main repo
16
star
89

DalleHelperBot

Chatbot to help you craft DALLE prompts
Python
16
star
90

AutoMuse

Python
16
star
91

GAIA_Initiative

Global AI Agencies - an offshoot of GATO. Advocating for national, international, and global AI research and safety
16
star
92

nonfiction_drafting

private repo for nonfiction drafting
Python
15
star
93

Raven_MVP

Public repo for Raven MVP
Python
15
star
94

Functional_Sentience

Paper on Functional (vs Philosophical) Sentience
15
star
95

YouTubeCommentDownloader

Python
14
star
96

Grand_Struggle_Great_Mystery

Core philosophies for the modern world.
14
star
97

EU_AI_Act

Let's decompose the EU AI Act with GPT
Python
13
star
98

JobMatching

Experiment to match job applications with job descriptions using GPT-3
13
star
99

Flask_Chat_Voice

Python
12
star
100

ENGAGE_Model

Embracing Novelty, Growth, and Genuine Experiences (ENGAGE)
12
star