Skip to content

Commit

Permalink
Merge pull request #49 from michaelthwan/pre-release
Browse files Browse the repository at this point in the history
Pre-release readme related update
  • Loading branch information
michaelthwan authored Mar 5, 2023
2 parents 0c9e9b1 + 3ea5d33 commit edeed82
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 5 deletions.
60 changes: 60 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# I would like to make it better..

Thanks for your contribution!

### Determine what to do

There are so many possibilities to start with. For example

- Studies on API calls like Toolformer
- Studies on uncertainty in the search results. If the response is unsure or source didn't contain useful info, it shouldn't answer with confident.
- Studies in open-source model integration and not relies on API. To be better, even using RLHF model
- Studies on better generation of footnote. In word-level, or instrinsic model generated footnote.
- Prompt engineering
- Supports of markdown, code result, point form result, etc.
- Use it to generate data for training of another LLM model
- Make a better/robust UI
- ...

### Taking on Tasks

Please create a github issue on a problem that appeals to you.
If there are any issues/features you want to address, mention them in your comment along with a brief explanation of
how you'll resolve the issue. As soon as a project coordinator assigns you the problem, you can start working on it. (But you can still start first!)

### Submitting a Pull Request
(We are not familiar with Github process. This reference LAION-AI/Open-Assistant)

1. [Fork this project repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo)
and clone it to your local machine. (Read more
[About Forks](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks))
1. Before working on any changes, try to
[sync the forked repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork)
to keep it up-to-date with the upstream repository.
1. On a
[new branch](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository)
in your fork (aka a "feature branch" and not `master`) work on a small focused change that only touches on a few files.
1. Package up a small bit of work that solves part of the problem
[into a Pull Request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork)
and
[send it out for review](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/requesting-a-pull-request-review).
[Here](https://github.com/michaelthwan/searchGPT/pull/42) is an example PR
for this project to illustrate this flow.
1. If you're lucky, we can merge your change into `master` without any problems.
If there are changes to files you're working on, resolve them by:
1. First try to rebase as suggested
[in these instructions](https://timwise.co.uk/2019/10/14/merge-vs-rebase/#should-you-rebase).
1. If rebasing feels too painful, merge as suggested
[in these instructions](https://timwise.co.uk/2019/10/14/merge-vs-rebase/#should-you-merge).
1. Once you've resolved conflicts (if any), finish the review and
[squash and merge](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges#squash-and-merge-your-commits)
your PR (when squashing try to clean up or update the individual commit
messages to be one sensible single one).
1. Merge in your change and move on to a new issue or the second step of your current issue.

Additionally, if someone is working on an issue that interests you, ask if they
need help on it or would like suggestions on how to approach the issue. If so,
share wildly. If they seem to have a good handle on it, let them work on their
solution until a challenge comes up.

# Thank you for your contribution!
31 changes: 26 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ searchGPT - An Open-Source LLM-based Grounded Search Engine

This is a minimal implementation with modular plugin design, meaning you can choose different tech for different components.

You may imagine that it is like ChatGPT but supports file content search and latest web search.
You may imagine that it is like ChatGPT but answers using sources like the Internet and supports file content search.

(Demo page link is available below!)

![webui](/img/webui.png)

Features
--------
Expand All @@ -22,11 +26,28 @@ Architecture and roadmap

Why Grounded?
---------------
TODO
Because it is impossible for the LLM to learn everything during the training, thus real-time factual information is needed for reference.

Example of ungrounded false answers (both using `text-curie-001` model):

**Prompt: what is ghost kitchen**

| Ungrounded answer | Grounded answer (SearchGPT) |
| ------------------ |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| The Ghost Kitchen is a place where the departed spirits of cooks and dishwashers can cook and wash dishes with ease. The kitchen is said to be especially busy on Full Moon nights | A ghost kitchen is a physical space for operators to create food for off-premises consumption. [1] This type of kitchen doesn't have waiters, no dining room, and no parking lot – really, no public presence whatsoever. [1] This kitchen is designed to cut unnecessary costs, allowing a restaurant to expand easily with low capital. [2] With apps like GrubHub and DoorDash, restaurant owners can easily find orders and exceed their expected revenue. [3] |
| Ghost Kitchen is a pop-up restaurant in London that is completely without food. Instead, the restaurant is filled with spirits, who banish negative energy and help to make the guests' dining experience more enjoyable. | A ghost kitchen is a professional kitchen that is set up to cook food for delivery or take-out but does not have a dine-in option. [1] Ghost kitchens are often located in areas with high foot traffic and are used by multiple restaurants. [1] This allows restaurant chains to test new menu items without the investment of a brick-and-mortar location. [2] By having all of your orders in one place, a ghost kitchen can minimize the chances of errors and increase efficiency. [3] Additionally, by being located close to customers, a ghost kitchen can increase revenue. [4] While ghost kitchens are here to stay, they will likely face competition from other restaurants in the near future. [1] |

**Prompt: what is the meaning of wwww in Japanese**

| Ungrounded answer | Grounded answer (SearchGPT) |
|---------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Japanese "www" is typically used as a placeholder for "www." For example, "This is www." is typically translated to "Kore wa www.". Japanese "www" is also used to indicate that a webpage is not currently being viewed. | The meaning of "www" in Japanese is typically used to show amusement or to convey sarcasm. [1] It can also be used as a casual way to say "yes" or "okay." Additionally, speakers of Japanese may use "w" to represent the kana "笑" in online chat because it looks similar to the character for "laugh." [2] |

Demo page
---------------
Coming soon...
https://searchgpt-demo.herokuapp.com/index
- Please remain only UI search and don't call it with a program.
- Please be patient for the search loading time, which usually need ~10 seconds

Getting Started
---------------
Expand All @@ -39,7 +60,7 @@ To run `searchGPT`, you'll need:
* [OpenAI API Key](https://beta.openai.com/signup) or [GooseAI API Key](https://goose.ai/)
* OpenAI: First $18 is free (enough for you to have 3000+ searchs)
* GooseAI: First $10 is free
* [Azure Bing Search API Key](https://www.microsoft.com/en-us/bing/apis/bing-web-search-api/)
* [Azure Bing Search Subscription Key](https://www.microsoft.com/en-us/bing/apis/bing-web-search-api/)
* Free version is available (3 searchs per second, 1000 searchs per month

### Installation
Expand All @@ -60,7 +81,7 @@ pip install -r requirements.txt
```

2. Input API keys (OpenAI/Azure Bing Search) in `backend/src/config/config.yaml` (or using UI)
3. Run `flask_app.py` for frontend web app launching. `main.py` for stdout output.
3. Run `app.py`, (or `flask_app.py`) for frontend web app launching. `main.py` for stdout output only.
4. (optional, if you use pyterrier) Install JAVA >= 11
* Related linkes
- https://www.oracle.com/tw/java/technologies/downloads/#jdk19-windows
Expand Down
Binary file added img/webui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit edeed82

Please sign in to comment.