Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rag-flow-k8s
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michal Masrna
rag-flow-k8s
Commits
05298d56
There was an error fetching the commit references. Please try again later.
Unverified
Commit
05298d56
authored
11 months ago
by
KevinHuSh
Committed by
GitHub
11 months ago
Browse files
Options
Downloads
Patches
Plain Diff
refine README (#169)
parent
7bae41c7
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
README.md
+14
-0
14 additions, 0 deletions
README.md
api/apps/llm_app.py
+2
-1
2 additions, 1 deletion
api/apps/llm_app.py
api/db/services/common_service.py
+1
-1
1 addition, 1 deletion
api/db/services/common_service.py
rag/nlp/query.py
+2
-1
2 additions, 1 deletion
rag/nlp/query.py
with
19 additions
and
3 deletions
README.md
+
14
−
0
View file @
05298d56
...
...
@@ -47,6 +47,20 @@
## 🤺RagFlow vs. other RAG applications
| Feature | RagFlow | Langchain-Chatchat | Dify.AI | Assistants API | QAnythig | LangChain |
|---------|:---------:|:----------------:|:-----------:|:-----------:|:-----------:|:-----------:|
|
**Well-Founded Answer**
| :white_check_mark: | :x: | :x: | :x: | :x: | :x: |
|
**Trackable Chunking**
| :white_check_mark: | :x: | :x: | :x: | :x: | :x: |
|
**Chunking Method**
| Rich Variety | Naive | Naive | Naive | Naive | Naive |
|
**Table Structure Recognition**
| :white_check_mark: | :x: | :x: | :x: | :x: | :x: |
|
**Structured Data Lookup**
| :white_check_mark: | :x: | :x: | :x: | :x: | :x: |
|
**Programming Approach**
| API-oriented | API-oriented | API-oriented | API-oriented | API-oriented | Python Code-oriented |
|
**RAG Engine**
| :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: |
|
**Prompt IDE**
| :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: |
|
**Supported LLMs**
| Rich Variety | Rich Variety | Rich Variety | OpenAI-only | QwenLLM | Rich Variety |
|
**Local Deployment**
| :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: | :x: |
|
**Ecosystem Strategy**
| Open Source | Open Source | Open Source | Close Source | Open Source | Open Source |
## 🔎 System Architecture
<div
align=
"center"
style=
"margin-top:20px;margin-bottom:20px;"
>
...
...
This diff is collapsed.
Click to expand it.
api/apps/llm_app.py
+
2
−
1
View file @
05298d56
...
...
@@ -69,7 +69,8 @@ def set_api_key():
return
get_data_error_result
(
retmsg
=
msg
)
llm
=
{
"
api_key
"
:
req
[
"
api_key
"
]
"
api_key
"
:
req
[
"
api_key
"
],
"
api_base
"
:
req
.
get
(
"
base_url
"
,
""
)
}
for
n
in
[
"
model_type
"
,
"
llm_name
"
]:
if
n
in
req
:
...
...
This diff is collapsed.
Click to expand it.
api/db/services/common_service.py
+
1
−
1
View file @
05298d56
...
...
@@ -143,7 +143,7 @@ class CommonService:
@DB.connection_context
()
def
filter_update
(
cls
,
filters
,
update_data
):
with
DB
.
atomic
():
cls
.
model
.
update
(
update_data
).
where
(
*
filters
).
execute
()
return
cls
.
model
.
update
(
update_data
).
where
(
*
filters
).
execute
()
@staticmethod
def
cut_list
(
tar_list
,
n
):
...
...
This diff is collapsed.
Click to expand it.
rag/nlp/query.py
+
2
−
1
View file @
05298d56
# -*- coding: utf-8 -*-
import
json
import
math
import
re
import
logging
import
copy
...
...
@@ -167,4 +168,4 @@ class EsQueryer:
#d = 1e-9
# for k, v in dtwt.items():
# d += v * v
return
s
/
q
# math.sqrt(q) / math.sqrt(d)
return
s
/
q
/
max
(
1
,
math
.
sqrt
(
math
.
log10
(
max
(
len
(
qtwt
.
keys
()),
len
(
dtwt
.
keys
())))))
# math.sqrt(q) / math.sqrt(d)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment