Skip to content

Commit

Permalink
Merge pull request #98 from SylphAI-Inc/li
Browse files Browse the repository at this point in the history
[docs + model_client improvement]
  • Loading branch information
Sylph-AI authored Jul 9, 2024
2 parents 6040df3 + ae00738 commit 313f416
Show file tree
Hide file tree
Showing 21 changed files with 1,099 additions and 581 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

### ⚡ The PyTorch Library for Large Language Model Applications ⚡

*LightRAG* helps developers with both building and optimizing *Retriever-Agent-Generator (RAG)* pipelines.
*LightRAG* helps developers with both building and optimizing *Retriever-Agent-Generator* pipelines.
It is *light*, *modular*, and *robust*, with a 100% readable codebase.


Expand All @@ -22,7 +22,7 @@ It is *light*, *modular*, and *robust*, with a 100% readable codebase.

LLMs are like water; they can almost do anything, from GenAI applications such as chatbots, translation, summarization, code generation, and autonomous agents to classical NLP tasks like text classification and named entity recognition. They interact with the world beyond the model’s internal knowledge via retrievers, memory, and tools (function calls). Each use case is unique in its data, business logic, and user experience.

Because of this, no library can provide out-of-the-box solutions. Users must build towards their own use case, which requires the library to be modular, robust, and have a clean and readable codebase. The only code you should put into production is code you either trust 100% or are 100% clear about how to customize and iterate.
Because of this, no library can provide out-of-the-box solutions. Users must build toward their own use case. This requires the library to be modular, robust, and have a clean, readable codebase. The only code you should put into production is code you either 100% trust or are 100% clear about how to customize and iterate.

LightRAG is born to be light, modular, and robust, with a 100% readable codebase.

Expand Down
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ source/apis/tracing/tracing*
source/apis/tracing/modules*
source/apis/optim/optim*
source/apis/optim/modules*
tests.txt
1,113 changes: 986 additions & 127 deletions docs/poetry.lock

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions docs/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ packages = [{ from = "_dummy", include = "dummy" }] # empty packages

[tool.poetry.dependencies]
python = ">=3.11, <4.0"
lightrag = "^0.0.0a13" # Assuming this is the main library you are developing

lightrag = { path = "../lightrag", develop = true } # document always follow the latest version of the library

[tool.poetry.group.doc.dependencies]
pydata-sphinx-theme = "^0.15.3"
Expand All @@ -20,8 +19,16 @@ nbsphinx = "^0.9.4"
nbconvert = "^7.16.4"
pandoc = "^2.3"
readthedocs-sphinx-search = "^0.3.2"
# add optional packages to compile the documents correctly
sqlalchemy = "^2.0.31"
google-generativeai = "^0.7.1"
anthropic = "^0.30.1"
cohere = "^5.5.8"
transformers = "^4.42.3"
openai = "^1.35.12"
groq = "^0.9.0"
pgvector = "^0.3.0"
faiss-cpu = "^1.8.0.post1"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
4 changes: 2 additions & 2 deletions docs/source/developer_notes/lightrag_design_philosophy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Right from the begining, `LightRAG` follows three fundamental principles.

Principle 1: Simplicity over Complexity
-----------------------------------------------------------------------
We put these three hard rules while designing LightRAG:
We put these three hard rules while designing LightRAG:

- Every layer of abstraction needs to be adjusted and overall we do not allow more than 3 layers of abstraction.
- We minimize the lines of code instead of maximizing the lines of code.
- Go *deep* and *wide* in order to *simplify*. The clarity we achieve is not the result of being easy, but the result of being deep.
- Go *deep* and *wide* in order to *simplify*. The clarity we achieve is not the result of being easy.



Expand Down
14 changes: 8 additions & 6 deletions docs/source/get_started/lightrag_in_10_mins.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
LightRAG in 10 minutes
=============================
[Li]

Coming soon...

Will use end to end trec classifier as an example to demonstrate:
We will showcase a use case end-to-end, including task pipeline, configuration, logging and tracing, evaluation, and optimization.

1. Look at the data and task, create `data class`, `prompt`, and `task`, and set up `log` and tracing.
2. Create datasets with `train`, `eval`, and `test` splits.
3. Eval zero-shot with manual prompts.
.. Will use end to end trec classifier as an example to demonstrate:
.. 1. Look at the data and task, create `data class`, `prompt`, and `task`, and set up `log` and tracing.
.. 2. Create datasets with `train`, `eval`, and `test` splits.
.. 3. Eval zero-shot with manual prompts.
The content will be from `/use_cases/classification/readme.md`.
.. The content will be from `/use_cases/classification/readme.md`.
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<div style="text-align: center;">
<p>
<em>LightRAG</em> helps developers with both building and optimizing <em>Retriever-Agent-Generator (RAG)</em> pipelines.<br>
<em>LightRAG</em> helps developers with both building and optimizing <em>Retriever-Agent-Generator</em> pipelines.<br>
It is <em>light</em>, <em>modular</em>, and <em>robust</em>, with a 100% readable codebase.
</p>
</div>
Expand Down
Loading

0 comments on commit 313f416

Please sign in to comment.