Skip to content

Commit

Permalink
feat(ard): Add adr 002 initial draft
Browse files Browse the repository at this point in the history
  • Loading branch information
hiro-v committed Oct 4, 2023
1 parent cfb6e03 commit 7c0bd05
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions adr/adr-002-jan-replicants.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# ADR #002: {Jan replicant - Composable plugin}

## Changelog
- Oct 4th 2023: Initial draft

## Authors
- @vuonghoainam - Hiro
- @louis-jan

## Status
Proposed

## Context

### Business context
Jan can be a platform and let builders build their own `replicants` using existing tools
- Use-case 1: Medical AI startup uploads "case notes" to Jan, wants to ask it questions (i.e. medical audit)
- Use-case 2: Legal e-discovery: very large amount of documents (~10-15k pages) are uploaded, data is very private and cannot be leaked
- Use-case 3: Jan wants to use Jan to have a QnA chatbot to answer questions on docs
- Use-case 4: Jan wants to use Jan to have a codellama RAG on its own codebase, to generate new PRs

### Extra context
- There are many use cases that the community can develop and sell to the users through Jan as plugin. Jan needs to streamline higher value chain.
- This brings more value and more option to all kind of user
- This can help building ecosystem and streamline value end to end (Jan, plugins/ model creators, Jan users - enterprise/ individual)
- We at Jan cannot build plugins more on our own, but this one should serve as featured example like [OpenAI Retrieval plugin](https://github.com/openai/chatgpt-retrieval-plugin) does.
- [#232](https://github.com/janhq/jan/issues/232)

## Decision

- User can browse and install plugins (with recommended model - llama2, claude, openai …) - This requires plugin dependencies.
- Jan provide consistent interface for plugin developer to use:
- Use LLM (this can be switched in runtime) - i.e Dev in llama2-7b but user can use with llama2-70b. Can choose another model as well
- Plugin can have API for CRUD indices in vectorDB/ DB, and Jan only exposes corresponding data to the app
- A place for a plugin to store the files for persistence
- This works seamlessly on desktop/ Jan hosted version with Jan API abstraction.

### Simple UX
![UX](images/adr-002-01.png "UX")

### Component design
![Component design](images/adr-002-02.png "Component design")

## Consequences
- Jan user can build their own replicants (and buy from others too) in an easy way
- Clear design for plugin and Jan platform development

## Reference
Binary file added adr/images/adr-002-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added adr/images/adr-002-02.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 7c0bd05

Please sign in to comment.