pixxle commited on
Commit
3f34c28
·
verified ·
1 Parent(s): e4e29dc

Clarify external JSONL knowledge base and mobile project scope

Browse files
Files changed (1) hide show
  1. README.md +80 -1
README.md CHANGED
@@ -18,7 +18,11 @@ tags:
18
 
19
  LAI V3 is a lightweight bilingual causal language model developed by the Pixxle / LAI team for local inference. The intended product target is an offline mobile assistant that can handle short French/English conversations, answer grounded factual questions from injected facts, and prefer "I don't know" / "Je ne sais pas" when relevant facts are not available.
20
 
21
- This Hugging Face repository contains project release artifacts produced by the team: PyTorch checkpoints and the SentencePiece tokenizer used by the model family.
 
 
 
 
22
 
23
  ## Recommended checkpoint
24
 
@@ -38,6 +42,66 @@ For the most conservative grounded behavior:
38
  - User-context personalization when name, mood, or preferences are injected in the prompt
39
  - "I don't know" / "Je ne sais pas" style answers when a factual answer is requested without usable facts
40
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  ## Important Format Note
42
 
43
  These files are raw PyTorch checkpoints for a custom LAI architecture. They are not drop-in `transformers` checkpoints.
@@ -82,6 +146,8 @@ LAI V3 is meant to be used as one part of a larger product pipeline, not as an a
82
  5. The model generates a short answer in French or English.
83
  6. The app cleans the answer, persists user knowledge updates, and displays the final reply.
84
 
 
 
85
  Core prompt contract:
86
 
87
  ```text
@@ -179,6 +245,19 @@ In the app project, LAI V3 is paired with:
179
 
180
  The shipped mobile path uses a quantized runtime export of the final checkpoint for on-device inference. This Hub repo keeps the original released PyTorch checkpoints.
181
 
 
 
 
 
 
 
 
 
 
 
 
 
 
182
  ## Example Loading Pattern
183
 
184
  Minimal loading pattern with the project code:
 
18
 
19
  LAI V3 is a lightweight bilingual causal language model developed by the Pixxle / LAI team for local inference. The intended product target is an offline mobile assistant that can handle short French/English conversations, answer grounded factual questions from injected facts, and prefer "I don't know" / "Je ne sais pas" when relevant facts are not available.
20
 
21
+ This Hugging Face repository contains the released model artifacts only: PyTorch checkpoints and the SentencePiece tokenizer used by the LAI V3 family.
22
+
23
+ The complete product project is broader than this model release. The original target was to run LAI locally on mobile devices, especially iPhone, with a lightweight architecture adapted to local execution. The full application project, mobile integration, prompt pipeline, and product-level architecture are available on GitHub:
24
+
25
+ - [pixxlefr/LAI on GitHub](https://github.com/pixxlefr/LAI/tree/main)
26
 
27
  ## Recommended checkpoint
28
 
 
42
  - User-context personalization when name, mood, or preferences are injected in the prompt
43
  - "I don't know" / "Je ne sais pas" style answers when a factual answer is requested without usable facts
44
 
45
+ ## Core Product Concept: Model + External Knowledge Base
46
+
47
+ The main LAI idea is that the model should not be treated as the sole place where knowledge lives.
48
+
49
+ Instead, the intended architecture separates:
50
+
51
+ - the language model, which generates natural bilingual answers
52
+ - the knowledge base, stored separately in local `JSONL` files
53
+ - the retrieval layer, which searches that knowledge base before asking the model to answer
54
+
55
+ In other words:
56
+
57
+ - LAI V3 is the language and response layer
58
+ - the factual knowledge is expected to live outside the model
59
+ - the application should search the local knowledge base first, then inject the retrieved facts into the prompt
60
+
61
+ This is important because the project goal was local mobile execution. Keeping a separate knowledge base makes it easier to:
62
+
63
+ - update facts without retraining the model
64
+ - keep the model lighter for mobile devices
65
+ - control where factual answers come from
66
+ - prefer grounded answers over hallucinated ones
67
+
68
+ ## Knowledge Base Format
69
+
70
+ The intended product design uses local `JSONL` files as a simple knowledge store.
71
+
72
+ Typical idea:
73
+
74
+ - one JSON object per line
75
+ - keywords for retrieval
76
+ - language-specific fact strings to inject into the prompt
77
+
78
+ Example:
79
+
80
+ ```json
81
+ {"topic":"france","keywords":["france","paris"],"facts_fr":"La capitale de la France est Paris.","facts_en":"The capital of France is Paris."}
82
+ ```
83
+
84
+ The application is expected to search those `JSONL` entries, retrieve the most relevant facts, and then build the prompt given to LAI.
85
+
86
+ ## Intended Retrieval Behavior
87
+
88
+ For factual questions, the expected workflow is:
89
+
90
+ 1. the user asks a question
91
+ 2. the app searches the external knowledge base stored in `JSONL`
92
+ 3. the app selects matching facts
93
+ 4. the app injects those facts into `[FACTS]`
94
+ 5. LAI generates a short natural answer from those facts
95
+ 6. if nothing relevant is found, LAI should prefer an explicit unknown-answer style response
96
+
97
+ So the intended product logic is not:
98
+
99
+ - "ask the model and hope it knows"
100
+
101
+ It is:
102
+
103
+ - "search the local knowledge base first, then ask the model to formulate the answer"
104
+
105
  ## Important Format Note
106
 
107
  These files are raw PyTorch checkpoints for a custom LAI architecture. They are not drop-in `transformers` checkpoints.
 
146
  5. The model generates a short answer in French or English.
147
  6. The app cleans the answer, persists user knowledge updates, and displays the final reply.
148
 
149
+ For product use, this means the model should usually answer from retrieved facts rather than act like a closed factual database by itself.
150
+
151
  Core prompt contract:
152
 
153
  ```text
 
245
 
246
  The shipped mobile path uses a quantized runtime export of the final checkpoint for on-device inference. This Hub repo keeps the original released PyTorch checkpoints.
247
 
248
+ This Hugging Face repository therefore publishes the model layer, while the GitHub repository contains the larger local-mobile project:
249
+
250
+ - chat application
251
+ - prompt builder
252
+ - JSONL knowledge base handling
253
+ - user memory
254
+ - local storage
255
+ - native mobile inference integration
256
+
257
+ GitHub project:
258
+
259
+ - [https://github.com/pixxlefr/LAI/tree/main](https://github.com/pixxlefr/LAI/tree/main)
260
+
261
  ## Example Loading Pattern
262
 
263
  Minimal loading pattern with the project code: