Spaces:
Running
Running
Upload 8 files
Browse files- .env.example +12 -9
- README-DEPLOY.md +125 -134
- RELEASE_1.7.0.md +37 -0
- app.py +55 -24
- chat_knowledge.py +345 -0
- knowledge_base.json +951 -0
- openpolicyfinder.py +1 -1
- prompts.py +70 -64
.env.example
CHANGED
|
@@ -2,6 +2,18 @@
|
|
| 2 |
OPENAI_API_KEY=
|
| 3 |
KHAZNA_RELOAD_TOKEN=
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
# Optional Khazna dataset configuration
|
| 6 |
KHAZNA_DATASET=nikeshn/researchbee-data
|
| 7 |
HF_TOKEN=
|
|
@@ -12,15 +24,6 @@ CLOUDFLARE_WORKER_URL=
|
|
| 12 |
CLOUDFLARE_WORKER_TOKEN=
|
| 13 |
USAGE_PUSH_ENABLED=false
|
| 14 |
|
| 15 |
-
|
| 16 |
-
# Temporary Open Policy Finder public-page fallback (journal-level only)
|
| 17 |
-
# Disable immediately if Jisc asks you to stop public-page lookups.
|
| 18 |
-
OPF_WEB_FALLBACK_ENABLED=true
|
| 19 |
-
OPF_WEB_SUCCESS_TTL=86400
|
| 20 |
-
OPF_WEB_MISS_TTL=3600
|
| 21 |
-
OPF_WEB_ERROR_TTL=300
|
| 22 |
-
OPF_WEB_CACHE_MAX=512
|
| 23 |
-
|
| 24 |
# Optional model configuration
|
| 25 |
ASJC_LLM_MODEL=gpt-4.1-nano
|
| 26 |
ANTHROPIC_API_KEY=
|
|
|
|
| 2 |
OPENAI_API_KEY=
|
| 3 |
KHAZNA_RELOAD_TOKEN=
|
| 4 |
|
| 5 |
+
# Required for live journal-level Open Policy Finder checks
|
| 6 |
+
# Request an institutional/API key from Jisc and store it as a Space secret.
|
| 7 |
+
OPEN_POLICY_FINDER_API_KEY=
|
| 8 |
+
|
| 9 |
+
# Optional Open Policy Finder API cache and hydration limits
|
| 10 |
+
OPF_API_SUCCESS_TTL=86400
|
| 11 |
+
OPF_API_MISS_TTL=3600
|
| 12 |
+
OPF_API_ERROR_TTL=180
|
| 13 |
+
OPF_API_AUTH_TTL=60
|
| 14 |
+
OPF_API_CACHE_MAX=512
|
| 15 |
+
OPF_API_MAX_POLICY_HYDRATIONS=6
|
| 16 |
+
|
| 17 |
# Optional Khazna dataset configuration
|
| 18 |
KHAZNA_DATASET=nikeshn/researchbee-data
|
| 19 |
HF_TOKEN=
|
|
|
|
| 24 |
CLOUDFLARE_WORKER_TOKEN=
|
| 25 |
USAGE_PUSH_ENABLED=false
|
| 26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
# Optional model configuration
|
| 28 |
ASJC_LLM_MODEL=gpt-4.1-nano
|
| 29 |
ANTHROPIC_API_KEY=
|
README-DEPLOY.md
CHANGED
|
@@ -1,144 +1,156 @@
|
|
| 1 |
-
# ResearchBee v1.
|
| 2 |
|
| 3 |
-
This
|
| 4 |
-
temporary, read-only journal-level lookup against the live Open Policy Finder
|
| 5 |
-
public website while the official API key is pending. DOI checks still use
|
| 6 |
-
OA.Works for article-level permissions, and all deposit decisions retain explicit
|
| 7 |
-
three-valued states.
|
| 8 |
|
| 9 |
-
## 1.
|
| 10 |
|
| 11 |
-
| File |
|
| 12 |
|---|---|
|
| 13 |
-
| `app.py` |
|
| 14 |
-
| `prompts.py` |
|
| 15 |
-
| `
|
| 16 |
-
| `
|
| 17 |
-
| `
|
| 18 |
-
| `
|
| 19 |
-
| `
|
| 20 |
-
| `
|
| 21 |
-
| `openpolicyfinder_web.py` | ISSN-first public-page resolver, conservative parser, cache, provenance, and safe fallback |
|
| 22 |
|
| 23 |
-
|
| 24 |
-
from the supplied Hugging Face project.
|
| 25 |
|
| 26 |
-
## 2.
|
| 27 |
|
| 28 |
Add these under **Space Settings β Variables and secrets**:
|
| 29 |
|
| 30 |
```text
|
| 31 |
-
OPENAI_API_KEY=<
|
| 32 |
-
KHAZNA_RELOAD_TOKEN=<
|
|
|
|
| 33 |
```
|
| 34 |
|
| 35 |
-
|
|
|
|
|
|
|
| 36 |
|
| 37 |
```bash
|
| 38 |
python -c "import secrets; print(secrets.token_urlsafe(48))"
|
| 39 |
```
|
| 40 |
|
| 41 |
-
Optional Khazna
|
| 42 |
|
| 43 |
```text
|
| 44 |
KHAZNA_DATASET=nikeshn/researchbee-data
|
| 45 |
-
HF_TOKEN=<
|
| 46 |
```
|
| 47 |
|
| 48 |
-
|
| 49 |
-
or browser JavaScript.
|
| 50 |
|
| 51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
|
| 53 |
-
|
| 54 |
|
| 55 |
-
|
| 56 |
-
- `401` when the caller supplies no token
|
| 57 |
-
- `403` when the supplied token is wrong
|
| 58 |
-
- success only after constant-time token comparison
|
| 59 |
|
| 60 |
-
|
| 61 |
-
|
|
|
|
|
|
|
| 62 |
|
| 63 |
-
```
|
| 64 |
-
|
| 65 |
-
"https://YOUR-SPACE.hf.space/api/admin/reload-khazna" \
|
| 66 |
-
--header "X-ResearchBee-Reload-Token: ${KHAZNA_RELOAD_TOKEN}"
|
| 67 |
```
|
| 68 |
|
| 69 |
-
|
| 70 |
|
| 71 |
-
``
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
|
|
|
|
|
|
| 76 |
|
| 77 |
-
|
| 78 |
-
Never call this endpoint from the LibGuides frontend.
|
| 79 |
|
| 80 |
-
|
| 81 |
|
| 82 |
-
|
| 83 |
-
API base currently points to:
|
| 84 |
|
| 85 |
```text
|
| 86 |
https://nikeshn-researchbee.hf.space
|
| 87 |
```
|
| 88 |
|
| 89 |
-
Change
|
| 90 |
-
different Space.
|
| 91 |
|
| 92 |
-
|
| 93 |
|
| 94 |
-
|
| 95 |
-
preserve multiple policy options, and include a short link to the current
|
| 96 |
-
Open Policy Finder record.
|
| 97 |
-
- A public journal page is never presented as an article-specific permission
|
| 98 |
-
decision; the overall deposit recommendation remains `Unknown` without a DOI.
|
| 99 |
-
- Cover-letter payloads remain in JavaScript memory and are not embedded in
|
| 100 |
-
inline event attributes.
|
| 101 |
-
- Related-work titles, authors, links, and citation-chain actions are created
|
| 102 |
-
through DOM APIs and event listeners.
|
| 103 |
-
- Citation-chain requests pass through `/api/openalex-cited-by`.
|
| 104 |
-
- Subject search expands each journal's complete `quartiles_by_field` list.
|
| 105 |
-
- Journal Finder explicitly says that deposit rights require the DOI-based
|
| 106 |
-
License Checking workflow.
|
| 107 |
|
| 108 |
-
|
|
|
|
|
|
|
|
|
|
| 109 |
|
| 110 |
-
|
| 111 |
-
Policy Finder website by ISSN first and exact journal title second. It accepts a
|
| 112 |
-
record only after an exact ISSN match or a strong title match, reads the visible
|
| 113 |
-
Submitted/Accepted/Published option summaries, and returns the exact record URL.
|
| 114 |
|
| 115 |
-
|
| 116 |
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
```
|
| 124 |
|
| 125 |
-
|
| 126 |
|
| 127 |
-
|
| 128 |
-
-
|
| 129 |
-
-
|
| 130 |
-
-
|
| 131 |
-
|
| 132 |
-
- `No ... policy in place` is displayed as `No policy listed`, not as a denial.
|
| 133 |
-
- The frontend always links users to the live record for confirmation.
|
| 134 |
|
| 135 |
-
|
| 136 |
-
available, add an authenticated adapter using the `x-api-key` header and keep the
|
| 137 |
-
current public-page adapter only as a controlled fallback, or disable it.
|
| 138 |
|
| 139 |
-
##
|
| 140 |
|
| 141 |
-
|
| 142 |
|
| 143 |
```bash
|
| 144 |
python -m pip install -r requirements-dev.txt
|
|
@@ -146,57 +158,36 @@ pytest -q
|
|
| 146 |
python -m compileall -q .
|
| 147 |
```
|
| 148 |
|
| 149 |
-
|
| 150 |
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
10. Exact ISSN/title matching and rejection of mismatched records
|
| 161 |
-
11. Journal-level endpoint integration, provenance, live link, and safe fallback
|
| 162 |
-
12. Frontend web-source labels and option rendering
|
| 163 |
-
|
| 164 |
-
After deployment, check:
|
| 165 |
-
|
| 166 |
-
```text
|
| 167 |
-
GET /api/health
|
| 168 |
```
|
| 169 |
|
| 170 |
-
Then
|
| 171 |
-
|
| 172 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 173 |
|
| 174 |
-
##
|
| 175 |
|
| 176 |
-
ResearchBee
|
| 177 |
|
| 178 |
```text
|
| 179 |
permission_status: allowed | denied | unknown
|
| 180 |
embargo_status: zero | stated | unknown
|
| 181 |
```
|
| 182 |
|
| 183 |
-
An absent embargo
|
| 184 |
-
`Yes` only when permission is allowed and the trusted record explicitly states
|
| 185 |
-
zero embargo. When no verified permission record exists, ResearchBee says that
|
| 186 |
-
it could not determine the right rather than claiming the right is denied.
|
| 187 |
-
|
| 188 |
-
## 8. Repository response contract
|
| 189 |
-
|
| 190 |
-
The language model may return only:
|
| 191 |
-
|
| 192 |
-
```json
|
| 193 |
-
{
|
| 194 |
-
"id": "exact_registry_id",
|
| 195 |
-
"fit_reason": "dataset-specific explanation",
|
| 196 |
-
"fit_confidence": "High|Medium|Low"
|
| 197 |
-
}
|
| 198 |
-
```
|
| 199 |
-
|
| 200 |
-
The server rejects unknown IDs and supplies the repository name, URL, cost,
|
| 201 |
-
identifier, versioning, embargo support, source URL, and verification date from
|
| 202 |
-
`repositories.py`.
|
|
|
|
| 1 |
+
# ResearchBee v1.7.0 β deployment and maintenance guide
|
| 2 |
|
| 3 |
+
This release adds a source-aware chat knowledge layer and a dismissible service-introduction popup while retaining the three structured ResearchBee workflows.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
+
## 1. Release files
|
| 6 |
|
| 7 |
+
| File | Purpose |
|
| 8 |
|---|---|
|
| 9 |
+
| `app.py` | FastAPI endpoints, explicit-task routing, relevant knowledge retrieval, and health status |
|
| 10 |
+
| `prompts.py` | Grounded chat instructions and capability limits |
|
| 11 |
+
| `knowledge_base.json` | Curated general knowledge, source URLs, review dates, and review cycles |
|
| 12 |
+
| `chat_knowledge.py` | Dependency-free lexical/hybrid retriever for general and KU content |
|
| 13 |
+
| `ku_knowledge.py` | Maintained KU-specific service and policy content |
|
| 14 |
+
| `openpolicyfinder.py` | Authenticated Jisc Open Policy Finder API client |
|
| 15 |
+
| `ResearchBee_LibGuides.html` | Complete LibGuides fragment, including the popup and expanded chat welcome |
|
| 16 |
+
| `tests/` | Regression tests for retrieval, routing, policy safety, repository grounding, and front-end behaviour |
|
|
|
|
| 17 |
|
| 18 |
+
Historical release notes remain in the repository for reference; this document describes the active v1.7.0 configuration.
|
|
|
|
| 19 |
|
| 20 |
+
## 2. Hugging Face Space secrets
|
| 21 |
|
| 22 |
Add these under **Space Settings β Variables and secrets**:
|
| 23 |
|
| 24 |
```text
|
| 25 |
+
OPENAI_API_KEY=<OpenAI API key>
|
| 26 |
+
KHAZNA_RELOAD_TOKEN=<long random secret shared with the harvest workflow>
|
| 27 |
+
OPEN_POLICY_FINDER_API_KEY=<active Jisc Open Policy Finder API key>
|
| 28 |
```
|
| 29 |
|
| 30 |
+
The OPF key must never be placed in LibGuides JavaScript. The backend sends it only in the `x-api-key` request header to the official Jisc API origin.
|
| 31 |
+
|
| 32 |
+
Generate the Khazna reload token with a password manager or:
|
| 33 |
|
| 34 |
```bash
|
| 35 |
python -c "import secrets; print(secrets.token_urlsafe(48))"
|
| 36 |
```
|
| 37 |
|
| 38 |
+
Optional Khazna settings:
|
| 39 |
|
| 40 |
```text
|
| 41 |
KHAZNA_DATASET=nikeshn/researchbee-data
|
| 42 |
+
HF_TOKEN=<only when the dataset requires authentication>
|
| 43 |
```
|
| 44 |
|
| 45 |
+
Optional OPF operational settings:
|
|
|
|
| 46 |
|
| 47 |
+
```text
|
| 48 |
+
OPF_API_SUCCESS_TTL=86400
|
| 49 |
+
OPF_API_MISS_TTL=3600
|
| 50 |
+
OPF_API_ERROR_TTL=180
|
| 51 |
+
OPF_API_AUTH_TTL=60
|
| 52 |
+
OPF_API_CACHE_MAX=512
|
| 53 |
+
OPF_API_MAX_POLICY_HYDRATIONS=6
|
| 54 |
+
```
|
| 55 |
|
| 56 |
+
Do not set a custom OPF API host. The client intentionally ignores non-official base URLs so an API key cannot be sent to an arbitrary server.
|
| 57 |
|
| 58 |
+
## 3. Deploying the backend
|
|
|
|
|
|
|
|
|
|
| 59 |
|
| 60 |
+
1. Upload the backend files to the Hugging Face Space repository.
|
| 61 |
+
2. Configure the secrets above.
|
| 62 |
+
3. Confirm that the Space builds successfully from `Dockerfile` and listens on port `7860`.
|
| 63 |
+
4. Open:
|
| 64 |
|
| 65 |
+
```text
|
| 66 |
+
GET /api/health
|
|
|
|
|
|
|
| 67 |
```
|
| 68 |
|
| 69 |
+
The response should show:
|
| 70 |
|
| 71 |
+
- `version: 1.7.0`
|
| 72 |
+
- `knowledge_base.loaded: true`
|
| 73 |
+
- the expected knowledge entry count
|
| 74 |
+
- Open Policy Finder `configured: true` when its key is present
|
| 75 |
+
- journal-index and Khazna status
|
| 76 |
+
|
| 77 |
+
An unconfigured OPF key must produce an unavailable/unknown policy result, not a guessed permission.
|
| 78 |
|
| 79 |
+
## 4. Deploying the LibGuides front end
|
|
|
|
| 80 |
|
| 81 |
+
Paste the complete contents of `ResearchBee_LibGuides.html` into the LibGuides HTML/source-code area.
|
| 82 |
|
| 83 |
+
The API constants currently target:
|
|
|
|
| 84 |
|
| 85 |
```text
|
| 86 |
https://nikeshn-researchbee.hf.space
|
| 87 |
```
|
| 88 |
|
| 89 |
+
Change the API base constants only when deploying to a different Space.
|
|
|
|
| 90 |
|
| 91 |
+
### Service-introduction behaviour
|
| 92 |
|
| 93 |
+
The v1.7.0 fragment displays a service card after initial page load. It explains:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 94 |
|
| 95 |
+
- journal finding and comparison
|
| 96 |
+
- article-sharing and self-archiving checks
|
| 97 |
+
- research-data repository selection
|
| 98 |
+
- the ResearchBee chat assistant
|
| 99 |
|
| 100 |
+
It closes on the first click anywhere, the close button, either action button, or Escape. A versioned `sessionStorage` key prevents repeat display during the same browser session. Changing `data-researchbee-version` causes the introduction to be shown once for the new release.
|
|
|
|
|
|
|
|
|
|
| 101 |
|
| 102 |
+
### Chat behaviour
|
| 103 |
|
| 104 |
+
The welcome message and starters now cover journal selection, metrics, KU APC questions, and repository selection. Educational questions stay in chat. Explicit requests such as βFind journals for my manuscriptβ still route to the relevant structured tool.
|
| 105 |
+
|
| 106 |
+
## 5. Maintaining the knowledge base
|
| 107 |
+
|
| 108 |
+
The system uses two maintained knowledge sources:
|
| 109 |
+
|
| 110 |
+
- `ku_knowledge.py` for KU-specific content
|
| 111 |
+
- `knowledge_base.json` for general journal, publishing, Open Access, RDM, repository, research-integrity, and research-analytics guidance
|
| 112 |
+
|
| 113 |
+
The JSON records include source URLs, authority labels, review dates, and review cycles. To update a record:
|
| 114 |
+
|
| 115 |
+
1. Check the current primary source.
|
| 116 |
+
2. Revise only what that source supports.
|
| 117 |
+
3. Keep time-sensitive policies out of static guidance when a live API is available.
|
| 118 |
+
4. Update the record's `reviewed` date.
|
| 119 |
+
5. Add retrieval terms under `topics` when users may phrase the question differently.
|
| 120 |
+
6. Run all tests.
|
| 121 |
+
|
| 122 |
+
The application does not automatically ingest live LibGuide text. This is deliberate: automatic crawling can silently import navigation, stale fragments, or incomplete content. A future scheduled ingestion pipeline can be added, but it should preserve source snapshots, review approval, and rollback rather than publishing crawled text directly to the model.
|
| 123 |
+
|
| 124 |
+
## 6. Authenticated Khazna reload
|
| 125 |
+
|
| 126 |
+
`POST /api/admin/reload-khazna` fails closed:
|
| 127 |
+
|
| 128 |
+
- `503` when `KHAZNA_RELOAD_TOKEN` is not configured
|
| 129 |
+
- `401` when no token is supplied
|
| 130 |
+
- `403` when the token is wrong
|
| 131 |
+
- success only after constant-time comparison
|
| 132 |
+
|
| 133 |
+
Recommended call:
|
| 134 |
+
|
| 135 |
+
```bash
|
| 136 |
+
curl --fail-with-body --request POST \
|
| 137 |
+
"https://YOUR-SPACE.hf.space/api/admin/reload-khazna" \
|
| 138 |
+
--header "X-ResearchBee-Reload-Token: ${KHAZNA_RELOAD_TOKEN}"
|
| 139 |
```
|
| 140 |
|
| 141 |
+
Bearer authentication is also supported:
|
| 142 |
|
| 143 |
+
```bash
|
| 144 |
+
curl --fail-with-body --request POST \
|
| 145 |
+
"https://YOUR-SPACE.hf.space/api/admin/reload-khazna" \
|
| 146 |
+
--header "Authorization: Bearer ${KHAZNA_RELOAD_TOKEN}"
|
| 147 |
+
```
|
|
|
|
|
|
|
| 148 |
|
| 149 |
+
Never call this endpoint from browser JavaScript.
|
|
|
|
|
|
|
| 150 |
|
| 151 |
+
## 7. Verification before publishing
|
| 152 |
|
| 153 |
+
Run:
|
| 154 |
|
| 155 |
```bash
|
| 156 |
python -m pip install -r requirements-dev.txt
|
|
|
|
| 158 |
python -m compileall -q .
|
| 159 |
```
|
| 160 |
|
| 161 |
+
To validate the embedded JavaScript:
|
| 162 |
|
| 163 |
+
```bash
|
| 164 |
+
python - <<'PY'
|
| 165 |
+
from pathlib import Path
|
| 166 |
+
import re
|
| 167 |
+
html = Path('ResearchBee_LibGuides.html').read_text(encoding='utf-8')
|
| 168 |
+
scripts = re.findall(r'<script[^>]*>(.*?)</script>', html, flags=re.S | re.I)
|
| 169 |
+
Path('/tmp/researchbee.js').write_text('\n'.join(scripts), encoding='utf-8')
|
| 170 |
+
PY
|
| 171 |
+
node --check /tmp/researchbee.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 172 |
```
|
| 173 |
|
| 174 |
+
Then manually verify:
|
| 175 |
+
|
| 176 |
+
1. The introduction appears once and closes on the first click.
|
| 177 |
+
2. All three structured tools submit and render results.
|
| 178 |
+
3. βHow do I choose the best journal?β receives an explanatory chat answer rather than an immediate redirect.
|
| 179 |
+
4. βFind journals for my manuscriptβ routes to Journal Finder.
|
| 180 |
+
5. A named journal-policy question uses OPF when configured and labels unresolved fields honestly.
|
| 181 |
+
6. `/api/health` reports the knowledge base and data sources.
|
| 182 |
+
7. English/Arabic controls, mobile tabs, and the mobile chat bar remain usable.
|
| 183 |
|
| 184 |
+
## 8. Safe interpretation rules retained
|
| 185 |
|
| 186 |
+
ResearchBee continues to distinguish:
|
| 187 |
|
| 188 |
```text
|
| 189 |
permission_status: allowed | denied | unknown
|
| 190 |
embargo_status: zero | stated | unknown
|
| 191 |
```
|
| 192 |
|
| 193 |
+
An absent embargo is `unknown`, never zero. Journal-level policy options are not automatically article-level permission. Repository names, URLs, costs, identifier support, versioning, and other factual attributes continue to come from the curated server registry rather than free-form model output.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RELEASE_1.7.0.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ResearchBee v1.7.0 release notes
|
| 2 |
+
|
| 3 |
+
Released: 2026-09-09
|
| 4 |
+
|
| 5 |
+
## Source-aware chat knowledge
|
| 6 |
+
|
| 7 |
+
- Added 32 curated knowledge records across journal selection, metrics, publishing, Open Access, research integrity, research data management, repository selection, responsible AI, and research analytics.
|
| 8 |
+
- Added source names, URLs, authority classes, review dates, and review cycles to every record.
|
| 9 |
+
- Added query-time retrieval so the model receives relevant records instead of one ever-growing prompt.
|
| 10 |
+
- Added section retrieval from the existing KU knowledge file for local questions.
|
| 11 |
+
- Kept changing journal-policy facts in the live Open Policy Finder layer.
|
| 12 |
+
|
| 13 |
+
## More useful routing
|
| 14 |
+
|
| 15 |
+
- Educational questions such as βWhat is Q1?β, βHow do I choose a journal?β, and βWhat is FAIR data?β are now answered by chat.
|
| 16 |
+
- Explicit action requests continue to route immediately to Journal Finder, License Checking, or the Data Repository tool.
|
| 17 |
+
- Specific journal self-archiving questions can reach the Open Policy Finder workflow before any tab route is suggested.
|
| 18 |
+
|
| 19 |
+
## Honest capability boundaries
|
| 20 |
+
|
| 21 |
+
- Removed the prompt's unsupported web-search claim.
|
| 22 |
+
- Added instructions not to invent current policies, fees, agreements, repository terms, or URLs.
|
| 23 |
+
- Preserved `unknown` for missing policy evidence.
|
| 24 |
+
|
| 25 |
+
## LibGuides introduction
|
| 26 |
+
|
| 27 |
+
- Added a responsive, accessible first-visit card describing all three tools and the chat assistant.
|
| 28 |
+
- The card closes on the first click anywhere, the close button, either action button, or Escape.
|
| 29 |
+
- Versioned session storage prevents repeated display in the same browser session.
|
| 30 |
+
- Expanded the chat welcome and example questions.
|
| 31 |
+
|
| 32 |
+
## Operations
|
| 33 |
+
|
| 34 |
+
- Bumped the API and LibGuides versions to 1.7.0.
|
| 35 |
+
- Added knowledge-base status to `/api/health`.
|
| 36 |
+
- Documented the authenticated Jisc Open Policy Finder API configuration.
|
| 37 |
+
- Added regression tests for knowledge retrieval, routing, prompt capability limits, and popup behaviour.
|
app.py
CHANGED
|
@@ -1,5 +1,11 @@
|
|
| 1 |
"""
|
| 2 |
-
ResearchBee - FastAPI backend v1.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
|
| 4 |
Changes in v1.6.0:
|
| 5 |
- Journal-level licence checks use the authenticated Jisc Open Policy Finder API.
|
|
@@ -70,7 +76,7 @@ from prompts import (
|
|
| 70 |
JOURNAL_SYSTEM_PROMPT, REPO_SYSTEM_PROMPT,
|
| 71 |
SUBJECT_NORMALISE_PROMPT, COVER_LETTER_PROMPT, CHAT_SYSTEM_PROMPT_BASE,
|
| 72 |
)
|
| 73 |
-
from
|
| 74 |
from utils import norm_issn
|
| 75 |
|
| 76 |
# ββ Verified-source modules (no LLM inside any of these) ββββββββββββββββββ
|
|
@@ -294,34 +300,48 @@ KHAZNA_DEPOSIT_CARD = {
|
|
| 294 |
"metadata_tip": "Even if depositing data in a domain-specific repository, always register metadata in Khazna so your work appears in KU's research portfolio.",
|
| 295 |
}
|
| 296 |
|
| 297 |
-
|
| 298 |
"journals": [
|
| 299 |
-
"find
|
| 300 |
-
"
|
| 301 |
-
"
|
| 302 |
-
"
|
| 303 |
-
"
|
| 304 |
],
|
| 305 |
"license": [
|
| 306 |
-
"
|
| 307 |
-
"
|
| 308 |
-
"sherpa", "green oa policy", "self-archiving", "deposit my paper",
|
| 309 |
-
"deposit my article", "version of record", "vor", "aam", "repository rights",
|
| 310 |
-
"can i post", "can i upload my paper",
|
| 311 |
],
|
| 312 |
"data": [
|
| 313 |
-
"
|
| 314 |
-
"
|
| 315 |
-
"
|
|
|
|
| 316 |
],
|
| 317 |
}
|
| 318 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 319 |
|
| 320 |
def quick_route(message: str) -> Optional[str]:
|
| 321 |
-
"""
|
| 322 |
-
|
| 323 |
-
|
| 324 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 325 |
return tab
|
| 326 |
return None
|
| 327 |
|
|
@@ -419,7 +439,7 @@ async def lifespan(app: FastAPI):
|
|
| 419 |
|
| 420 |
|
| 421 |
# ββ App ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 422 |
-
app = FastAPI(title="ResearchBee API", version="1.
|
| 423 |
|
| 424 |
app.add_middleware(
|
| 425 |
CORSMiddleware,
|
|
@@ -959,12 +979,13 @@ async def health():
|
|
| 959 |
return {
|
| 960 |
"status": "ok",
|
| 961 |
"service": "ResearchBee",
|
| 962 |
-
"version": "1.
|
| 963 |
# Restart detection for the uptime monitor. boot_ts is the stable
|
| 964 |
# identity of this process; when it changes between two polls the
|
| 965 |
# container was replaced, whatever the HTTP status said.
|
| 966 |
"boot_ts": round(BOOT_TS, 3),
|
| 967 |
"uptime_s": round(now - BOOT_TS, 1),
|
|
|
|
| 968 |
"sources": {
|
| 969 |
"oaworks": {
|
| 970 |
"endpoint": oaworks.OA_WORKS_BASE + oaworks.PERMISSIONS_PATH,
|
|
@@ -1849,10 +1870,20 @@ async def chat(req: ChatRequest, request: Request):
|
|
| 1849 |
# ββ Layer 3: LLM streaming ββββββββββββββββββββββββββββββββββββββββββββ
|
| 1850 |
client = get_client()
|
| 1851 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1852 |
system = CHAT_SYSTEM_PROMPT_BASE.replace(
|
| 1853 |
-
"{
|
| 1854 |
).replace(
|
| 1855 |
-
"{OPF_DATA}", opf_data if opf_data else "No Open Policy Finder data retrieved for this query."
|
| 1856 |
)
|
| 1857 |
|
| 1858 |
if req.language == "arabic":
|
|
|
|
| 1 |
"""
|
| 2 |
+
ResearchBee - FastAPI backend v1.7.0 (curated chat knowledge retrieval)
|
| 3 |
+
|
| 4 |
+
Changes in v1.7.0:
|
| 5 |
+
- Chat knowledge is stored as source-aware topic records and retrieved per question.
|
| 6 |
+
- Educational journal, metrics, publishing, OA, and RDM questions are answered in chat.
|
| 7 |
+
- Fast routing is limited to explicit tool requests so it no longer hides useful guidance.
|
| 8 |
+
- The chat prompt no longer claims unrestricted web browsing.
|
| 9 |
|
| 10 |
Changes in v1.6.0:
|
| 11 |
- Journal-level licence checks use the authenticated Jisc Open Policy Finder API.
|
|
|
|
| 76 |
JOURNAL_SYSTEM_PROMPT, REPO_SYSTEM_PROMPT,
|
| 77 |
SUBJECT_NORMALISE_PROMPT, COVER_LETTER_PROMPT, CHAT_SYSTEM_PROMPT_BASE,
|
| 78 |
)
|
| 79 |
+
from chat_knowledge import get_chat_knowledge, knowledge_status
|
| 80 |
from utils import norm_issn
|
| 81 |
|
| 82 |
# ββ Verified-source modules (no LLM inside any of these) ββββββββββββββββββ
|
|
|
|
| 300 |
"metadata_tip": "Even if depositing data in a domain-specific repository, always register metadata in Khazna so your work appears in KU's research portfolio.",
|
| 301 |
}
|
| 302 |
|
| 303 |
+
FAST_ROUTE_PATTERNS = {
|
| 304 |
"journals": [
|
| 305 |
+
r"\b(?:find|recommend|suggest|match|identify|show me|give me)\b.{0,100}\bjournal(?:s)?\b",
|
| 306 |
+
r"\bwhere (?:should|can) i publish\b",
|
| 307 |
+
r"\banaly[sz]e my (?:paper|manuscript|abstract)\b",
|
| 308 |
+
r"\bbrowse journals?\b",
|
| 309 |
+
r"\bopen (?:the )?journal (?:finder|tool|tab)\b",
|
| 310 |
],
|
| 311 |
"license": [
|
| 312 |
+
r"\b(?:open|use|show|take me to)\b.{0,50}\b(?:license|sharing|self[- ]?archiv) (?:checker|tool|tab)\b",
|
| 313 |
+
r"\bopen policy checker\b",
|
|
|
|
|
|
|
|
|
|
| 314 |
],
|
| 315 |
"data": [
|
| 316 |
+
r"\b(?:find|recommend|suggest|match|identify|show me|give me)\b.{0,100}\b(?:data )?repositor(?:y|ies)\b",
|
| 317 |
+
r"\bwhere (?:should|can) i deposit (?:my )?(?:data|dataset)\b",
|
| 318 |
+
r"\bwhich repository (?:should|can) i use for (?:my )?(?:data|dataset)\b",
|
| 319 |
+
r"\bopen (?:the )?(?:data )?repository (?:finder|tool|tab)\b",
|
| 320 |
],
|
| 321 |
}
|
| 322 |
|
| 323 |
+
_INFORMATIONAL_OPENERS = (
|
| 324 |
+
"what is", "what are", "what does", "how does", "how do", "how can",
|
| 325 |
+
"why is", "why are", "explain", "tell me about", "difference between",
|
| 326 |
+
"compare", "which metric", "when should", "tips for", "criteria for",
|
| 327 |
+
)
|
| 328 |
+
|
| 329 |
|
| 330 |
def quick_route(message: str) -> Optional[str]:
|
| 331 |
+
"""Return a tab only for an explicit structured-tool request.
|
| 332 |
+
|
| 333 |
+
The previous broad keyword router sent questions such as "What is FAIR
|
| 334 |
+
data?" or "How do I choose the best journal?" straight to a tab. That made
|
| 335 |
+
an expanded knowledge base unreachable. Informational questions now go to
|
| 336 |
+
the assistant, while clear action requests still receive an instant route.
|
| 337 |
+
"""
|
| 338 |
+
msg = " ".join(message.lower().split())
|
| 339 |
+
if not msg:
|
| 340 |
+
return None
|
| 341 |
+
if msg.startswith(_INFORMATIONAL_OPENERS):
|
| 342 |
+
return None
|
| 343 |
+
for tab, patterns in FAST_ROUTE_PATTERNS.items():
|
| 344 |
+
if any(re.search(pattern, msg, flags=re.IGNORECASE) for pattern in patterns):
|
| 345 |
return tab
|
| 346 |
return None
|
| 347 |
|
|
|
|
| 439 |
|
| 440 |
|
| 441 |
# ββ App ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 442 |
+
app = FastAPI(title="ResearchBee API", version="1.7.0", lifespan=lifespan)
|
| 443 |
|
| 444 |
app.add_middleware(
|
| 445 |
CORSMiddleware,
|
|
|
|
| 979 |
return {
|
| 980 |
"status": "ok",
|
| 981 |
"service": "ResearchBee",
|
| 982 |
+
"version": "1.7.0",
|
| 983 |
# Restart detection for the uptime monitor. boot_ts is the stable
|
| 984 |
# identity of this process; when it changes between two polls the
|
| 985 |
# container was replaced, whatever the HTTP status said.
|
| 986 |
"boot_ts": round(BOOT_TS, 3),
|
| 987 |
"uptime_s": round(now - BOOT_TS, 1),
|
| 988 |
+
"knowledge_base": knowledge_status(),
|
| 989 |
"sources": {
|
| 990 |
"oaworks": {
|
| 991 |
"endpoint": oaworks.OA_WORKS_BASE + oaworks.PERMISSIONS_PATH,
|
|
|
|
| 1870 |
# ββ Layer 3: LLM streaming ββββββββββββββββββββββββββββββββββββββββββββ
|
| 1871 |
client = get_client()
|
| 1872 |
|
| 1873 |
+
try:
|
| 1874 |
+
retrieved_knowledge = get_chat_knowledge(last_msg)
|
| 1875 |
+
except Exception as exc: # noqa: BLE001 - chat should degrade safely
|
| 1876 |
+
logger.exception("[Chat] Curated knowledge retrieval failed: %s", exc)
|
| 1877 |
+
retrieved_knowledge = (
|
| 1878 |
+
"The curated knowledge index is temporarily unavailable. Give only stable general "
|
| 1879 |
+
"guidance, do not invent current policies or links, and direct KU-specific questions "
|
| 1880 |
+
"to the KU Library."
|
| 1881 |
+
)
|
| 1882 |
+
|
| 1883 |
system = CHAT_SYSTEM_PROMPT_BASE.replace(
|
| 1884 |
+
"{RETRIEVED_KNOWLEDGE}", retrieved_knowledge
|
| 1885 |
).replace(
|
| 1886 |
+
"{OPF_DATA}", opf_data if opf_data else "No live Open Policy Finder data was retrieved for this query."
|
| 1887 |
)
|
| 1888 |
|
| 1889 |
if req.language == "arabic":
|
chat_knowledge.py
ADDED
|
@@ -0,0 +1,345 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Source-aware retrieval for the ResearchBee chat assistant.
|
| 2 |
+
|
| 3 |
+
The curated general knowledge lives in ``knowledge_base.json``. KU-specific
|
| 4 |
+
policy and service content remains in ``ku_knowledge.py`` and is split into
|
| 5 |
+
sections at runtime. Only the sections relevant to the latest user question are
|
| 6 |
+
placed in the model context.
|
| 7 |
+
|
| 8 |
+
This is intentionally a small, dependency-free hybrid lexical retriever. It is
|
| 9 |
+
fast enough for a Hugging Face Space, transparent to librarians, and avoids
|
| 10 |
+
sending the entire knowledge base with every chat request. It can later be
|
| 11 |
+
replaced by a vector or full-text index without changing the public interface.
|
| 12 |
+
"""
|
| 13 |
+
from __future__ import annotations
|
| 14 |
+
|
| 15 |
+
import json
|
| 16 |
+
import math
|
| 17 |
+
import re
|
| 18 |
+
from dataclasses import dataclass
|
| 19 |
+
from functools import lru_cache
|
| 20 |
+
from pathlib import Path
|
| 21 |
+
from typing import Iterable, Sequence
|
| 22 |
+
|
| 23 |
+
from ku_knowledge import KU_OA_KNOWLEDGE
|
| 24 |
+
|
| 25 |
+
ROOT = Path(__file__).resolve().parent
|
| 26 |
+
KNOWLEDGE_PATH = ROOT / "knowledge_base.json"
|
| 27 |
+
|
| 28 |
+
_TOKEN_RE = re.compile(r"[a-z0-9]+(?:\.[a-z0-9]+)?", re.IGNORECASE)
|
| 29 |
+
_SECTION_RE = re.compile(
|
| 30 |
+
r"(?:^|\n)[β]{8,}\n(?P<title>[^\n]+)\n[β]{8,}\n",
|
| 31 |
+
re.MULTILINE,
|
| 32 |
+
)
|
| 33 |
+
|
| 34 |
+
_STOP_WORDS = {
|
| 35 |
+
"a", "about", "all", "also", "am", "an", "and", "any", "are", "as",
|
| 36 |
+
"at", "be", "been", "before", "but", "by", "can", "could", "do", "does",
|
| 37 |
+
"for", "from", "give", "help", "how", "i", "in", "is", "it", "me", "my",
|
| 38 |
+
"of", "on", "or", "please", "should", "tell", "that", "the", "their",
|
| 39 |
+
"there", "these", "this", "to", "use", "want", "what", "when", "where",
|
| 40 |
+
"which", "who", "why", "with", "would", "you",
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
# Query terms that users commonly treat as interchangeable. Expansion is only
|
| 44 |
+
# used for retrieval; it is never shown to the model as a factual assertion.
|
| 45 |
+
_SYNONYM_GROUPS: tuple[tuple[str, ...], ...] = (
|
| 46 |
+
("journal", "journals", "publication", "venue", "publish"),
|
| 47 |
+
("best", "suitable", "appropriate", "right", "match", "shortlist"),
|
| 48 |
+
("ranking", "rank", "metric", "metrics", "quartile", "percentile"),
|
| 49 |
+
("impact", "jif", "impactfactor", "citescore", "sjr", "snip", "jci"),
|
| 50 |
+
("repository", "repositories", "archive", "deposit"),
|
| 51 |
+
("dataset", "data", "rdm"),
|
| 52 |
+
("selfarchive", "selfarchiving", "green", "aam", "postprint", "embargo"),
|
| 53 |
+
("trusted", "trustworthy", "legitimate", "predatory", "scam"),
|
| 54 |
+
("apc", "fee", "funding", "agreement", "waiver", "discount"),
|
| 55 |
+
("ku", "khalifa", "university"),
|
| 56 |
+
("fair", "findable", "accessible", "interoperable", "reusable"),
|
| 57 |
+
("author", "authorship", "contributor", "credit", "orcid"),
|
| 58 |
+
)
|
| 59 |
+
|
| 60 |
+
_CATEGORY_HINTS: dict[str, set[str]] = {
|
| 61 |
+
"journals": {"journal", "journals", "publish", "venue", "scope", "shortlist"},
|
| 62 |
+
"metrics": {"metric", "ranking", "rank", "quartile", "percentile", "citescore", "jif", "jcr", "sjr", "snip"},
|
| 63 |
+
"integrity": {"predatory", "trusted", "trustworthy", "scam", "ethics", "peer", "editorial"},
|
| 64 |
+
"publishing": {"manuscript", "submission", "cover", "reviewer", "revision", "authorship", "orcid"},
|
| 65 |
+
"open-access": {"open", "access", "apc", "embargo", "aam", "preprint", "selfarchive", "licence", "license"},
|
| 66 |
+
"rdm": {"data", "dataset", "rdm", "fair", "metadata", "dmp", "sensitive"},
|
| 67 |
+
"repositories": {"repository", "repositories", "deposit", "zenodo", "dryad", "figshare", "khazna"},
|
| 68 |
+
"ai": {"ai", "chatgpt", "generative", "hallucination"},
|
| 69 |
+
"analytics": {"scopus", "scival", "citation", "analytics", "benchmarking", "fwci"},
|
| 70 |
+
"researchbee": {"researchbee", "service", "services", "tool", "tools", "chat"},
|
| 71 |
+
"ku": {"ku", "khalifa", "library"},
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
@dataclass(frozen=True)
|
| 76 |
+
class KnowledgeEntry:
|
| 77 |
+
id: str
|
| 78 |
+
category: str
|
| 79 |
+
title: str
|
| 80 |
+
summary: str
|
| 81 |
+
topics: tuple[str, ...]
|
| 82 |
+
sources: tuple[tuple[str, str], ...]
|
| 83 |
+
authority: str
|
| 84 |
+
reviewed: str
|
| 85 |
+
review_cycle_days: int
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
@dataclass(frozen=True)
|
| 89 |
+
class RankedEntry:
|
| 90 |
+
score: float
|
| 91 |
+
entry: KnowledgeEntry
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
def _fold_token(token: str) -> str:
|
| 95 |
+
return token.lower().replace("-", "").replace("_", "")
|
| 96 |
+
|
| 97 |
+
|
| 98 |
+
def _tokens(text: str) -> set[str]:
|
| 99 |
+
found = {_fold_token(m.group(0)) for m in _TOKEN_RE.finditer(text.lower())}
|
| 100 |
+
found = {t for t in found if t and t not in _STOP_WORDS}
|
| 101 |
+
expanded = set(found)
|
| 102 |
+
for group in _SYNONYM_GROUPS:
|
| 103 |
+
folded = {_fold_token(item) for item in group}
|
| 104 |
+
if found & folded:
|
| 105 |
+
expanded.update(folded)
|
| 106 |
+
return expanded
|
| 107 |
+
|
| 108 |
+
|
| 109 |
+
@lru_cache(maxsize=1)
|
| 110 |
+
def load_entries() -> tuple[KnowledgeEntry, ...]:
|
| 111 |
+
"""Load and validate the curated JSON knowledge base once per process."""
|
| 112 |
+
raw = json.loads(KNOWLEDGE_PATH.read_text(encoding="utf-8"))
|
| 113 |
+
entries: list[KnowledgeEntry] = []
|
| 114 |
+
seen: set[str] = set()
|
| 115 |
+
for item in raw.get("entries", []):
|
| 116 |
+
entry_id = str(item.get("id", "")).strip()
|
| 117 |
+
if not entry_id or entry_id in seen:
|
| 118 |
+
raise ValueError(f"Invalid or duplicate knowledge entry id: {entry_id!r}")
|
| 119 |
+
seen.add(entry_id)
|
| 120 |
+
sources: list[tuple[str, str]] = []
|
| 121 |
+
for source in item.get("sources", []):
|
| 122 |
+
name = str(source.get("name", "")).strip()
|
| 123 |
+
url = str(source.get("url", "")).strip()
|
| 124 |
+
if name and url.startswith(("https://", "http://")):
|
| 125 |
+
sources.append((name, url))
|
| 126 |
+
entries.append(
|
| 127 |
+
KnowledgeEntry(
|
| 128 |
+
id=entry_id,
|
| 129 |
+
category=str(item.get("category", "general")).strip() or "general",
|
| 130 |
+
title=str(item.get("title", "")).strip(),
|
| 131 |
+
summary=str(item.get("summary", "")).strip(),
|
| 132 |
+
topics=tuple(str(x).strip() for x in item.get("topics", []) if str(x).strip()),
|
| 133 |
+
sources=tuple(sources),
|
| 134 |
+
authority=str(item.get("authority", "")).strip(),
|
| 135 |
+
reviewed=str(item.get("reviewed", "")).strip(),
|
| 136 |
+
review_cycle_days=max(1, int(item.get("review_cycle_days", 180))),
|
| 137 |
+
)
|
| 138 |
+
)
|
| 139 |
+
if not entries:
|
| 140 |
+
raise ValueError("knowledge_base.json contains no entries")
|
| 141 |
+
return tuple(entries)
|
| 142 |
+
|
| 143 |
+
|
| 144 |
+
@lru_cache(maxsize=1)
|
| 145 |
+
def _document_frequency() -> dict[str, int]:
|
| 146 |
+
frequency: dict[str, int] = {}
|
| 147 |
+
for entry in load_entries():
|
| 148 |
+
doc_tokens = _tokens(" ".join((entry.title, entry.summary, " ".join(entry.topics))))
|
| 149 |
+
for token in doc_tokens:
|
| 150 |
+
frequency[token] = frequency.get(token, 0) + 1
|
| 151 |
+
return frequency
|
| 152 |
+
|
| 153 |
+
|
| 154 |
+
def _entry_score(query: str, query_tokens: set[str], entry: KnowledgeEntry) -> float:
|
| 155 |
+
title_tokens = _tokens(entry.title)
|
| 156 |
+
topic_text = " ".join(entry.topics)
|
| 157 |
+
topic_tokens = _tokens(topic_text)
|
| 158 |
+
summary_tokens = _tokens(entry.summary)
|
| 159 |
+
category_tokens = _tokens(entry.category)
|
| 160 |
+
df = _document_frequency()
|
| 161 |
+
n_docs = len(load_entries())
|
| 162 |
+
|
| 163 |
+
score = 0.0
|
| 164 |
+
for token in query_tokens:
|
| 165 |
+
idf = math.log((n_docs + 1) / (df.get(token, 0) + 1)) + 1.0
|
| 166 |
+
if token in title_tokens:
|
| 167 |
+
score += 5.0 * idf
|
| 168 |
+
if token in topic_tokens:
|
| 169 |
+
score += 4.0 * idf
|
| 170 |
+
if token in category_tokens:
|
| 171 |
+
score += 2.5 * idf
|
| 172 |
+
if token in summary_tokens:
|
| 173 |
+
score += 1.2 * idf
|
| 174 |
+
|
| 175 |
+
query_lower = query.lower().strip()
|
| 176 |
+
for phrase in entry.topics:
|
| 177 |
+
phrase_lower = phrase.lower()
|
| 178 |
+
if len(phrase_lower) >= 4 and phrase_lower in query_lower:
|
| 179 |
+
score += 10.0 + min(5.0, len(phrase_lower) / 10.0)
|
| 180 |
+
|
| 181 |
+
hints = _CATEGORY_HINTS.get(entry.category, set())
|
| 182 |
+
if query_tokens & hints:
|
| 183 |
+
score += 3.0
|
| 184 |
+
|
| 185 |
+
# These two records are useful only when directly relevant; avoid allowing
|
| 186 |
+
# generic words such as "help" to crowd out substantive content.
|
| 187 |
+
if entry.id == "researchbee-services" and not (
|
| 188 |
+
{"researchbee", "service", "services", "tool", "tools", "chat"} & query_tokens
|
| 189 |
+
):
|
| 190 |
+
score *= 0.35
|
| 191 |
+
if entry.id == "ku-first-party-guides" and not (
|
| 192 |
+
{"ku", "khalifa", "library", "guide", "guides"} & query_tokens
|
| 193 |
+
):
|
| 194 |
+
score *= 0.35
|
| 195 |
+
return score
|
| 196 |
+
|
| 197 |
+
|
| 198 |
+
def retrieve_general_entries(query: str, max_entries: int = 6) -> tuple[RankedEntry, ...]:
|
| 199 |
+
query_tokens = _tokens(query)
|
| 200 |
+
if not query_tokens:
|
| 201 |
+
default_ids = {"researchbee-services", "journal-selection-workflow", "repository-selection-workflow"}
|
| 202 |
+
return tuple(
|
| 203 |
+
RankedEntry(1.0, entry) for entry in load_entries() if entry.id in default_ids
|
| 204 |
+
)[:max_entries]
|
| 205 |
+
|
| 206 |
+
ranked = sorted(
|
| 207 |
+
(RankedEntry(_entry_score(query, query_tokens, entry), entry) for entry in load_entries()),
|
| 208 |
+
key=lambda item: (-item.score, item.entry.id),
|
| 209 |
+
)
|
| 210 |
+
positive = [item for item in ranked if item.score >= 2.0]
|
| 211 |
+
if not positive:
|
| 212 |
+
positive = ranked[:2]
|
| 213 |
+
return tuple(positive[:max_entries])
|
| 214 |
+
|
| 215 |
+
|
| 216 |
+
@lru_cache(maxsize=1)
|
| 217 |
+
def _ku_sections() -> tuple[tuple[str, str], ...]:
|
| 218 |
+
matches = list(_SECTION_RE.finditer(KU_OA_KNOWLEDGE))
|
| 219 |
+
sections: list[tuple[str, str]] = []
|
| 220 |
+
for index, match in enumerate(matches):
|
| 221 |
+
start = match.start()
|
| 222 |
+
end = matches[index + 1].start() if index + 1 < len(matches) else len(KU_OA_KNOWLEDGE)
|
| 223 |
+
title = match.group("title").strip()
|
| 224 |
+
body = KU_OA_KNOWLEDGE[start:end].strip()
|
| 225 |
+
sections.append((title, body))
|
| 226 |
+
return tuple(sections)
|
| 227 |
+
|
| 228 |
+
|
| 229 |
+
def _ku_score(query: str, query_tokens: set[str], title: str, body: str) -> float:
|
| 230 |
+
title_tokens = _tokens(title)
|
| 231 |
+
body_tokens = _tokens(body)
|
| 232 |
+
score = 0.0
|
| 233 |
+
for token in query_tokens:
|
| 234 |
+
if token in title_tokens:
|
| 235 |
+
score += 5.0
|
| 236 |
+
if token in body_tokens:
|
| 237 |
+
score += 1.0
|
| 238 |
+
|
| 239 |
+
q = query.lower()
|
| 240 |
+
boosts: tuple[tuple[tuple[str, ...], tuple[str, ...]], ...] = (
|
| 241 |
+
(("apc", "funding", "pay", "agreement", "tier"), ("FUNDING", "PUBLISHER-SPECIFIC")),
|
| 242 |
+
(("wiley", "elsevier", "springer", "taylor", "acs", "ieee"), ("PUBLISHER-SPECIFIC",)),
|
| 243 |
+
(("khazna",), ("KHAZNA",)),
|
| 244 |
+
(("journal", "citescore", "quartile", "top 15", "rating"), ("JOURNAL", "RATINGS")),
|
| 245 |
+
(("scopus", "web of science", "scival", "analytics", "h-index", "h index"), ("RESEARCH ANALYTICS",)),
|
| 246 |
+
(("researchbee", "what can", "service", "tool"), ("RESEARCHBEE TOOLS", "KEY CONTACTS")),
|
| 247 |
+
(("contact", "librarian", "email", "support"), ("KEY CONTACTS",)),
|
| 248 |
+
(("open access", "gold", "green", "hybrid"), ("WHAT IS OPEN ACCESS", "KU OPEN ACCESS POLICY")),
|
| 249 |
+
)
|
| 250 |
+
upper_title = title.upper()
|
| 251 |
+
for triggers, title_fragments in boosts:
|
| 252 |
+
if any(trigger in q for trigger in triggers) and any(fragment in upper_title for fragment in title_fragments):
|
| 253 |
+
score += 10.0
|
| 254 |
+
return score
|
| 255 |
+
|
| 256 |
+
|
| 257 |
+
def retrieve_ku_sections(query: str, max_sections: int = 4) -> tuple[tuple[float, str, str], ...]:
|
| 258 |
+
query_tokens = _tokens(query)
|
| 259 |
+
ku_signal = bool({"ku", "khalifa", "apc", "khazna", "library", "researchbee"} & query_tokens)
|
| 260 |
+
publisher_signal = any(name in query.lower() for name in ("wiley", "elsevier", "springer", "taylor", "acs", "ieee"))
|
| 261 |
+
if not ku_signal and not publisher_signal:
|
| 262 |
+
return ()
|
| 263 |
+
|
| 264 |
+
ranked = sorted(
|
| 265 |
+
((_ku_score(query, query_tokens, title, body), title, body) for title, body in _ku_sections()),
|
| 266 |
+
key=lambda item: (-item[0], item[1]),
|
| 267 |
+
)
|
| 268 |
+
selected = [item for item in ranked if item[0] >= 2.0]
|
| 269 |
+
if not selected:
|
| 270 |
+
selected = ranked[:2]
|
| 271 |
+
return tuple(selected[:max_sections])
|
| 272 |
+
|
| 273 |
+
|
| 274 |
+
def _format_sources(sources: Sequence[tuple[str, str]]) -> str:
|
| 275 |
+
if not sources:
|
| 276 |
+
return ""
|
| 277 |
+
return "\n".join(f"- {name}: {url}" for name, url in sources)
|
| 278 |
+
|
| 279 |
+
|
| 280 |
+
def _format_entry(item: RankedEntry) -> str:
|
| 281 |
+
entry = item.entry
|
| 282 |
+
source_block = _format_sources(entry.sources)
|
| 283 |
+
return (
|
| 284 |
+
f"### {entry.title}\n"
|
| 285 |
+
f"{entry.summary}\n"
|
| 286 |
+
f"Authority: {entry.authority or 'Curated guidance'}\n"
|
| 287 |
+
f"Last reviewed: {entry.reviewed or 'Not recorded'}\n"
|
| 288 |
+
f"Sources:\n{source_block or '- No external source recorded'}"
|
| 289 |
+
)
|
| 290 |
+
|
| 291 |
+
|
| 292 |
+
def get_chat_knowledge(query: str, *, max_entries: int = 6, max_ku_sections: int = 4, max_chars: int = 16000) -> str:
|
| 293 |
+
"""Return a compact, source-bearing context for one user question."""
|
| 294 |
+
general = retrieve_general_entries(query, max_entries=max_entries)
|
| 295 |
+
ku = retrieve_ku_sections(query, max_sections=max_ku_sections)
|
| 296 |
+
|
| 297 |
+
blocks = [
|
| 298 |
+
"CURATED KNOWLEDGE RETRIEVED FOR THIS QUESTION",
|
| 299 |
+
(
|
| 300 |
+
"Use these records as guidance, not as permission to invent missing facts. "
|
| 301 |
+
"For changing policies, fees, agreements, metrics, or repository terms, prefer a live "
|
| 302 |
+
"source result when one is supplied and tell the user what still needs verification."
|
| 303 |
+
),
|
| 304 |
+
]
|
| 305 |
+
if general:
|
| 306 |
+
blocks.append("\n## Curated topic guidance\n" + "\n\n".join(_format_entry(item) for item in general))
|
| 307 |
+
if ku:
|
| 308 |
+
blocks.append(
|
| 309 |
+
"\n## Relevant KU Library knowledge\n"
|
| 310 |
+
+ "\n\n".join(body for _score, _title, body in ku)
|
| 311 |
+
)
|
| 312 |
+
if not general and not ku:
|
| 313 |
+
blocks.append(
|
| 314 |
+
"No specific curated record matched. Give only stable general guidance, say what cannot "
|
| 315 |
+
"be confirmed, and direct the user to the relevant KU Library service."
|
| 316 |
+
)
|
| 317 |
+
|
| 318 |
+
text = "\n\n".join(blocks).strip()
|
| 319 |
+
if len(text) <= max_chars:
|
| 320 |
+
return text
|
| 321 |
+
return text[: max_chars - 120].rstrip() + "\n\n[Context truncated to the configured safety limit.]"
|
| 322 |
+
|
| 323 |
+
|
| 324 |
+
def knowledge_status() -> dict[str, object]:
|
| 325 |
+
"""Small status block suitable for health/debug endpoints and tests."""
|
| 326 |
+
entries = load_entries()
|
| 327 |
+
raw = json.loads(KNOWLEDGE_PATH.read_text(encoding="utf-8"))
|
| 328 |
+
return {
|
| 329 |
+
"loaded": True,
|
| 330 |
+
"entries": len(entries),
|
| 331 |
+
"schema_version": raw.get("schema_version"),
|
| 332 |
+
"reviewed": raw.get("reviewed"),
|
| 333 |
+
"source_file": KNOWLEDGE_PATH.name,
|
| 334 |
+
}
|
| 335 |
+
|
| 336 |
+
|
| 337 |
+
__all__ = [
|
| 338 |
+
"KnowledgeEntry",
|
| 339 |
+
"RankedEntry",
|
| 340 |
+
"get_chat_knowledge",
|
| 341 |
+
"knowledge_status",
|
| 342 |
+
"load_entries",
|
| 343 |
+
"retrieve_general_entries",
|
| 344 |
+
"retrieve_ku_sections",
|
| 345 |
+
]
|
knowledge_base.json
ADDED
|
@@ -0,0 +1,951 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema_version": "1.0",
|
| 3 |
+
"name": "ResearchBee curated chat knowledge",
|
| 4 |
+
"reviewed": "2026-09-09",
|
| 5 |
+
"principles": [
|
| 6 |
+
"KU first-party policy and service pages take priority for KU-specific questions.",
|
| 7 |
+
"Use live source lookups for policies, fees, agreements, metrics, and repository terms that can change.",
|
| 8 |
+
"Never infer permission, eligibility, or trustworthiness from missing data.",
|
| 9 |
+
"Journal fit and transparent practice come before ranking numbers.",
|
| 10 |
+
"Sources and review dates must travel with retrieved knowledge."
|
| 11 |
+
],
|
| 12 |
+
"entries": [
|
| 13 |
+
{
|
| 14 |
+
"id": "researchbee-services",
|
| 15 |
+
"category": "researchbee",
|
| 16 |
+
"title": "What ResearchBee can help with",
|
| 17 |
+
"summary": "ResearchBee is Khalifa University Library's publishing and research-data assistant. It supports four connected needs: finding and comparing suitable journals; checking article self-archiving and repository rights; identifying appropriate research-data repositories; and answering questions about KU Open Access support, APCs, journal metrics, publishing practice, Khazna, and research data management. The structured tools should be used for journal matching, policy checking, and repository matching; the chat assistant should explain concepts, help users prepare, and interpret results.",
|
| 18 |
+
"topics": [
|
| 19 |
+
"researchbee",
|
| 20 |
+
"services",
|
| 21 |
+
"help",
|
| 22 |
+
"what can you do",
|
| 23 |
+
"chat",
|
| 24 |
+
"tools"
|
| 25 |
+
],
|
| 26 |
+
"sources": [
|
| 27 |
+
{
|
| 28 |
+
"name": "KU Journal Finder guide",
|
| 29 |
+
"url": "https://library.ku.ac.ae/journalfinder"
|
| 30 |
+
},
|
| 31 |
+
{
|
| 32 |
+
"name": "KU Research Data guide",
|
| 33 |
+
"url": "https://library.ku.ac.ae/researchdata"
|
| 34 |
+
},
|
| 35 |
+
{
|
| 36 |
+
"name": "KU AI Tools guide",
|
| 37 |
+
"url": "https://library.ku.ac.ae/aitools"
|
| 38 |
+
}
|
| 39 |
+
],
|
| 40 |
+
"authority": "KU Library",
|
| 41 |
+
"reviewed": "2026-09-09",
|
| 42 |
+
"review_cycle_days": 90
|
| 43 |
+
},
|
| 44 |
+
{
|
| 45 |
+
"id": "ku-first-party-guides",
|
| 46 |
+
"category": "ku",
|
| 47 |
+
"title": "KU Library guides are the first source for local services",
|
| 48 |
+
"summary": "For KU-specific questions, prioritize the current KU Library guide or policy over general external guidance. Use the AI Tools guide for tools available to KU users, the Journal Finder guide for journal-discovery and verification resources, the Research Data guide for local RDM guidance, and the Open Access guide for KU funding, publisher agreements, and deposit support. If a guide and an older chatbot record differ, the current KU page or policy is authoritative.",
|
| 49 |
+
"topics": [
|
| 50 |
+
"ku",
|
| 51 |
+
"khalifa university",
|
| 52 |
+
"library guide",
|
| 53 |
+
"ai tools",
|
| 54 |
+
"journal finder guide",
|
| 55 |
+
"research data guide"
|
| 56 |
+
],
|
| 57 |
+
"sources": [
|
| 58 |
+
{
|
| 59 |
+
"name": "KU AI Tools guide",
|
| 60 |
+
"url": "https://library.ku.ac.ae/aitools"
|
| 61 |
+
},
|
| 62 |
+
{
|
| 63 |
+
"name": "KU Journal Finder guide",
|
| 64 |
+
"url": "https://library.ku.ac.ae/journalfinder"
|
| 65 |
+
},
|
| 66 |
+
{
|
| 67 |
+
"name": "KU Research Data guide",
|
| 68 |
+
"url": "https://library.ku.ac.ae/researchdata"
|
| 69 |
+
},
|
| 70 |
+
{
|
| 71 |
+
"name": "KU Open Access guide",
|
| 72 |
+
"url": "https://library.ku.ac.ae/oa"
|
| 73 |
+
}
|
| 74 |
+
],
|
| 75 |
+
"authority": "KU Library",
|
| 76 |
+
"reviewed": "2026-09-09",
|
| 77 |
+
"review_cycle_days": 30
|
| 78 |
+
},
|
| 79 |
+
{
|
| 80 |
+
"id": "journal-selection-workflow",
|
| 81 |
+
"category": "journals",
|
| 82 |
+
"title": "A reliable workflow for choosing a journal",
|
| 83 |
+
"summary": "Choose a journal in stages rather than by one ranking number. First define the paper's topic, contribution, article type, methods, audience, and practical constraints. Next identify journals that publish closely related work and read their aims, scope, recent articles, and author instructions. Then verify indexing and title status in the source database, compare category-specific metrics, check peer-review and publication-ethics information, review access model, APCs, licences, waivers, and self-archiving rights, and confirm length, data, reporting, and submission requirements. Make a primary, secondary, and safer backup choice.",
|
| 84 |
+
"topics": [
|
| 85 |
+
"best journal",
|
| 86 |
+
"choose journal",
|
| 87 |
+
"where to publish",
|
| 88 |
+
"journal selection",
|
| 89 |
+
"shortlist",
|
| 90 |
+
"suitable journal"
|
| 91 |
+
],
|
| 92 |
+
"sources": [
|
| 93 |
+
{
|
| 94 |
+
"name": "KU Journal Finder guide",
|
| 95 |
+
"url": "https://library.ku.ac.ae/journalfinder"
|
| 96 |
+
},
|
| 97 |
+
{
|
| 98 |
+
"name": "Think. Check. Submit. journal checklist",
|
| 99 |
+
"url": "https://thinkchecksubmit.org/journals/"
|
| 100 |
+
}
|
| 101 |
+
],
|
| 102 |
+
"authority": "KU Library and cross-sector publishing guidance",
|
| 103 |
+
"reviewed": "2026-09-09",
|
| 104 |
+
"review_cycle_days": 180
|
| 105 |
+
},
|
| 106 |
+
{
|
| 107 |
+
"id": "journal-fit-scope-audience",
|
| 108 |
+
"category": "journals",
|
| 109 |
+
"title": "Journal fit: scope, audience, contribution, and article type",
|
| 110 |
+
"summary": "Topical fit is necessary but not sufficient. Check whether the journal's stated scope covers the manuscript's main question, methods, population or application area, and article type. Compare the manuscript with several recent papers, especially papers using similar methods or addressing a similar audience. A strong match should be easy to explain in one or two sentences: what the paper contributes, why the journal's readers need it, and how it extends work the journal already publishes. A high-ranked journal with weak scope fit is usually a poorer submission choice than a well-matched journal with appropriate reach.",
|
| 111 |
+
"topics": [
|
| 112 |
+
"journal scope",
|
| 113 |
+
"audience",
|
| 114 |
+
"article type",
|
| 115 |
+
"fit",
|
| 116 |
+
"aims and scope",
|
| 117 |
+
"recent articles",
|
| 118 |
+
"manuscript match"
|
| 119 |
+
],
|
| 120 |
+
"sources": [
|
| 121 |
+
{
|
| 122 |
+
"name": "KU Journal Finder guide",
|
| 123 |
+
"url": "https://library.ku.ac.ae/journalfinder"
|
| 124 |
+
},
|
| 125 |
+
{
|
| 126 |
+
"name": "Think. Check. Submit. journal checklist",
|
| 127 |
+
"url": "https://thinkchecksubmit.org/journals/"
|
| 128 |
+
}
|
| 129 |
+
],
|
| 130 |
+
"authority": "KU Library and cross-sector publishing guidance",
|
| 131 |
+
"reviewed": "2026-09-09",
|
| 132 |
+
"review_cycle_days": 180
|
| 133 |
+
},
|
| 134 |
+
{
|
| 135 |
+
"id": "journal-indexing-verification",
|
| 136 |
+
"category": "journals",
|
| 137 |
+
"title": "Verify journal indexing and current title status",
|
| 138 |
+
"summary": "Never rely only on a journal website's claim that it is indexed. Verify the exact title and ISSN in the relevant source list, and check the years of coverage, active or discontinued status, title changes, and predecessor or successor relationships. Scopus and Web of Science are separate databases with different selection systems and coverage. A journal may be indexed in one, both, or neither. Indexing is evidence of database coverage, not a guarantee that every article is high quality or that the journal is the right fit for a manuscript.",
|
| 139 |
+
"topics": [
|
| 140 |
+
"indexed",
|
| 141 |
+
"indexing",
|
| 142 |
+
"scopus indexed",
|
| 143 |
+
"web of science",
|
| 144 |
+
"master journal list",
|
| 145 |
+
"discontinued",
|
| 146 |
+
"issn",
|
| 147 |
+
"title status"
|
| 148 |
+
],
|
| 149 |
+
"sources": [
|
| 150 |
+
{
|
| 151 |
+
"name": "Scopus content coverage guide",
|
| 152 |
+
"url": "https://www.elsevier.com/products/scopus/content"
|
| 153 |
+
},
|
| 154 |
+
{
|
| 155 |
+
"name": "Web of Science Master Journal List",
|
| 156 |
+
"url": "https://mjl.clarivate.com/home"
|
| 157 |
+
},
|
| 158 |
+
{
|
| 159 |
+
"name": "KU Journal Finder guide",
|
| 160 |
+
"url": "https://library.ku.ac.ae/journalfinder"
|
| 161 |
+
}
|
| 162 |
+
],
|
| 163 |
+
"authority": "Database providers and KU Library",
|
| 164 |
+
"reviewed": "2026-09-09",
|
| 165 |
+
"review_cycle_days": 90
|
| 166 |
+
},
|
| 167 |
+
{
|
| 168 |
+
"id": "citescore-percentile-quartile",
|
| 169 |
+
"category": "metrics",
|
| 170 |
+
"title": "CiteScore, percentile, rank, and quartile",
|
| 171 |
+
"summary": "CiteScore is a Scopus journal-level citation-impact metric based on citations and peer-reviewed documents in a four-year window. The raw CiteScore should not be used to compare different subject fields because citation practices differ. CiteScore Percentile shows a title's relative position within a specific Scopus subject category; for example, the 90th percentile means the title performs above about 90 percent of titles in that category. Quartiles group category rankings into Q1 through Q4. Always state the metric year, database, and subject category, because one journal can have different percentiles or quartiles in different categories.",
|
| 172 |
+
"topics": [
|
| 173 |
+
"citescore",
|
| 174 |
+
"percentile",
|
| 175 |
+
"quartile",
|
| 176 |
+
"q1",
|
| 177 |
+
"q2",
|
| 178 |
+
"q3",
|
| 179 |
+
"q4",
|
| 180 |
+
"scopus rank",
|
| 181 |
+
"top 10 percent",
|
| 182 |
+
"top 15 percent"
|
| 183 |
+
],
|
| 184 |
+
"sources": [
|
| 185 |
+
{
|
| 186 |
+
"name": "Scopus Support: What is CiteScore?",
|
| 187 |
+
"url": "https://www.elsevier.support/scopus/answer/what-is-citescore"
|
| 188 |
+
},
|
| 189 |
+
{
|
| 190 |
+
"name": "KU Open Access ratings guidance",
|
| 191 |
+
"url": "https://library.ku.ac.ae/oa/ratings"
|
| 192 |
+
}
|
| 193 |
+
],
|
| 194 |
+
"authority": "Scopus and KU Library",
|
| 195 |
+
"reviewed": "2026-09-09",
|
| 196 |
+
"review_cycle_days": 365
|
| 197 |
+
},
|
| 198 |
+
{
|
| 199 |
+
"id": "sjr-snip",
|
| 200 |
+
"category": "metrics",
|
| 201 |
+
"title": "SJR and SNIP provide complementary views",
|
| 202 |
+
"summary": "SCImago Journal Rank, or SJR, weights citations according to the influence of the citing sources and is useful as one view of journal prestige within a network. Source Normalized Impact per Paper, or SNIP, adjusts citation impact for differences in a field's citation potential. They answer different questions and should be interpreted with CiteScore percentile, journal scope, coverage, and qualitative evidence. Report the year and source of every value, and avoid treating small differences as meaningful without considering the journal's field, size, age, and publication mix.",
|
| 203 |
+
"topics": [
|
| 204 |
+
"sjr",
|
| 205 |
+
"scimago journal rank",
|
| 206 |
+
"snip",
|
| 207 |
+
"source normalized impact",
|
| 208 |
+
"prestige",
|
| 209 |
+
"field normalized"
|
| 210 |
+
],
|
| 211 |
+
"sources": [
|
| 212 |
+
{
|
| 213 |
+
"name": "Scopus journal metrics guidance",
|
| 214 |
+
"url": "https://www.elsevier.com/products/scopus/metrics"
|
| 215 |
+
},
|
| 216 |
+
{
|
| 217 |
+
"name": "SCImago Journal and Country Rank",
|
| 218 |
+
"url": "https://www.scimagojr.com"
|
| 219 |
+
}
|
| 220 |
+
],
|
| 221 |
+
"authority": "Metric providers",
|
| 222 |
+
"reviewed": "2026-09-09",
|
| 223 |
+
"review_cycle_days": 365
|
| 224 |
+
},
|
| 225 |
+
{
|
| 226 |
+
"id": "jif-jci-jcr",
|
| 227 |
+
"category": "metrics",
|
| 228 |
+
"title": "Journal Impact Factor, Journal Citation Indicator, and JCR",
|
| 229 |
+
"summary": "Journal Citation Reports provides several journal-level indicators. The Journal Impact Factor summarizes citations to recent journal content, while the Journal Citation Indicator provides a field-normalized view. These indicators can help compare journals within suitable contexts, but they are not measures of the quality of an individual article, author, or institution. Use category benchmarks and multiple complementary indicators, and pair the numbers with scope, editorial practice, audience, publication model, and evidence from recent articles.",
|
| 230 |
+
"topics": [
|
| 231 |
+
"impact factor",
|
| 232 |
+
"jif",
|
| 233 |
+
"journal citation indicator",
|
| 234 |
+
"jci",
|
| 235 |
+
"journal citation reports",
|
| 236 |
+
"jcr",
|
| 237 |
+
"clarivate"
|
| 238 |
+
],
|
| 239 |
+
"sources": [
|
| 240 |
+
{
|
| 241 |
+
"name": "Clarivate Journal Citation Reports",
|
| 242 |
+
"url": "https://clarivate.com/academia-government/scientific-and-academic-research/research-funding-analytics/journal-citation-reports/"
|
| 243 |
+
},
|
| 244 |
+
{
|
| 245 |
+
"name": "DORA responsible indicators guidance",
|
| 246 |
+
"url": "https://sfdora.org/resource/guidance-on-the-responsible-use-of-quantitative-indicators-in-research-assessment/"
|
| 247 |
+
}
|
| 248 |
+
],
|
| 249 |
+
"authority": "Clarivate and DORA",
|
| 250 |
+
"reviewed": "2026-09-09",
|
| 251 |
+
"review_cycle_days": 365
|
| 252 |
+
},
|
| 253 |
+
{
|
| 254 |
+
"id": "responsible-use-of-metrics",
|
| 255 |
+
"category": "metrics",
|
| 256 |
+
"title": "Use journal metrics responsibly",
|
| 257 |
+
"summary": "No single number captures journal quality, research quality, or manuscript fit. Be clear about the decision the metric supports, transparent about its source and year, specific about what it measures, contextual about disciplinary differences, and fair about limitations. Do not infer the quality of an individual paper or researcher from the average citation performance of the journal. For journal selection, fit and trustworthiness come first; metrics are supporting evidence, not the decision by themselves.",
|
| 258 |
+
"topics": [
|
| 259 |
+
"responsible metrics",
|
| 260 |
+
"dora",
|
| 261 |
+
"metric limitations",
|
| 262 |
+
"journal quality",
|
| 263 |
+
"research quality",
|
| 264 |
+
"ranking mechanism"
|
| 265 |
+
],
|
| 266 |
+
"sources": [
|
| 267 |
+
{
|
| 268 |
+
"name": "DORA responsible indicators guidance",
|
| 269 |
+
"url": "https://sfdora.org/resource/guidance-on-the-responsible-use-of-quantitative-indicators-in-research-assessment/"
|
| 270 |
+
},
|
| 271 |
+
{
|
| 272 |
+
"name": "Clarivate Journal Citation Reports",
|
| 273 |
+
"url": "https://clarivate.com/academia-government/scientific-and-academic-research/research-funding-analytics/journal-citation-reports/"
|
| 274 |
+
}
|
| 275 |
+
],
|
| 276 |
+
"authority": "Responsible research assessment guidance",
|
| 277 |
+
"reviewed": "2026-09-09",
|
| 278 |
+
"review_cycle_days": 365
|
| 279 |
+
},
|
| 280 |
+
{
|
| 281 |
+
"id": "journal-trust-checklist",
|
| 282 |
+
"category": "integrity",
|
| 283 |
+
"title": "Check whether a journal is trustworthy",
|
| 284 |
+
"summary": "Check the journal's identity, publisher, contact details, editorial board, peer-review description, ownership, fees, waivers, licences, copyright, archiving, complaints and appeals, conflicts of interest, corrections and retractions, and preservation. Verify indexing and memberships independently rather than accepting logos on the website. For an open-access journal, check its DOAJ record where applicable. Warning signs include guaranteed or implausibly rapid acceptance, hidden charges, copied or confusing journal names, unverifiable editors, aggressive invitations unrelated to the author's field, and false metric claims. No single list or signal should be the sole decision.",
|
| 285 |
+
"topics": [
|
| 286 |
+
"predatory journal",
|
| 287 |
+
"trusted journal",
|
| 288 |
+
"trustworthy",
|
| 289 |
+
"scam journal",
|
| 290 |
+
"journal legitimacy",
|
| 291 |
+
"think check submit",
|
| 292 |
+
"doaj",
|
| 293 |
+
"cope"
|
| 294 |
+
],
|
| 295 |
+
"sources": [
|
| 296 |
+
{
|
| 297 |
+
"name": "Think. Check. Submit. journal checklist",
|
| 298 |
+
"url": "https://thinkchecksubmit.org/journals/"
|
| 299 |
+
},
|
| 300 |
+
{
|
| 301 |
+
"name": "DOAJ Principles of Transparency and Best Practice",
|
| 302 |
+
"url": "https://doaj.org/apply/transparency/"
|
| 303 |
+
},
|
| 304 |
+
{
|
| 305 |
+
"name": "COPE Core Principles",
|
| 306 |
+
"url": "https://publicationethics.org/core-principles"
|
| 307 |
+
}
|
| 308 |
+
],
|
| 309 |
+
"authority": "Cross-sector publishing integrity guidance",
|
| 310 |
+
"reviewed": "2026-09-09",
|
| 311 |
+
"review_cycle_days": 180
|
| 312 |
+
},
|
| 313 |
+
{
|
| 314 |
+
"id": "peer-review-and-editorial-transparency",
|
| 315 |
+
"category": "integrity",
|
| 316 |
+
"title": "Peer review and editorial transparency",
|
| 317 |
+
"summary": "A journal should explain the type of peer review it uses, who makes editorial decisions, how conflicts of interest are handled, and how complaints, appeals, corrections, retractions, and misconduct concerns are managed. Editorial-board names and affiliations should be credible and relevant to the field. Peer-review speed varies by discipline and manuscript complexity, so advertised timelines are estimates rather than guarantees. A promise of acceptance or publication without meaningful review is a serious warning sign.",
|
| 318 |
+
"topics": [
|
| 319 |
+
"peer review",
|
| 320 |
+
"editorial board",
|
| 321 |
+
"review time",
|
| 322 |
+
"acceptance guarantee",
|
| 323 |
+
"complaints",
|
| 324 |
+
"appeals",
|
| 325 |
+
"retraction"
|
| 326 |
+
],
|
| 327 |
+
"sources": [
|
| 328 |
+
{
|
| 329 |
+
"name": "COPE Core Principles",
|
| 330 |
+
"url": "https://publicationethics.org/core-principles"
|
| 331 |
+
},
|
| 332 |
+
{
|
| 333 |
+
"name": "DOAJ Principles of Transparency and Best Practice",
|
| 334 |
+
"url": "https://doaj.org/apply/transparency/"
|
| 335 |
+
},
|
| 336 |
+
{
|
| 337 |
+
"name": "Think. Check. Submit. journal checklist",
|
| 338 |
+
"url": "https://thinkchecksubmit.org/journals/"
|
| 339 |
+
}
|
| 340 |
+
],
|
| 341 |
+
"authority": "Publication ethics organizations",
|
| 342 |
+
"reviewed": "2026-09-09",
|
| 343 |
+
"review_cycle_days": 180
|
| 344 |
+
},
|
| 345 |
+
{
|
| 346 |
+
"id": "open-access-costs-and-licences",
|
| 347 |
+
"category": "open-access",
|
| 348 |
+
"title": "Compare access model, APCs, waivers, copyright, and licences",
|
| 349 |
+
"summary": "Open access does not automatically mean that an author pays an APC. A journal may be fully open access, hybrid, subscription-based with Green OA options, or diamond open access with no author APC. Before submission, check the exact journal and article type, the current APC and taxes, waivers or discounts, institutional agreements, whether optional page or colour charges apply, who retains copyright, which Creative Commons licences are offered, and what each licence permits. KU funding eligibility is a separate question and must be checked against the current KU OA guide and publisher agreement.",
|
| 350 |
+
"topics": [
|
| 351 |
+
"apc",
|
| 352 |
+
"open access fee",
|
| 353 |
+
"waiver",
|
| 354 |
+
"discount",
|
| 355 |
+
"copyright",
|
| 356 |
+
"creative commons",
|
| 357 |
+
"cc by",
|
| 358 |
+
"diamond oa",
|
| 359 |
+
"hybrid",
|
| 360 |
+
"gold oa"
|
| 361 |
+
],
|
| 362 |
+
"sources": [
|
| 363 |
+
{
|
| 364 |
+
"name": "KU Open Access guide",
|
| 365 |
+
"url": "https://library.ku.ac.ae/oa"
|
| 366 |
+
},
|
| 367 |
+
{
|
| 368 |
+
"name": "DOAJ Principles of Transparency and Best Practice",
|
| 369 |
+
"url": "https://doaj.org/apply/transparency/"
|
| 370 |
+
}
|
| 371 |
+
],
|
| 372 |
+
"authority": "KU Library and open-access standards",
|
| 373 |
+
"reviewed": "2026-09-09",
|
| 374 |
+
"review_cycle_days": 90
|
| 375 |
+
},
|
| 376 |
+
{
|
| 377 |
+
"id": "special-issues",
|
| 378 |
+
"category": "journals",
|
| 379 |
+
"title": "Evaluate special issues separately",
|
| 380 |
+
"summary": "A legitimate journal can still host a poorly managed special issue. Confirm that the special issue appears on the journal's official website, that guest editors are named and qualified, that the scope is coherent, and that normal peer-review, ethics, and editorial-oversight policies apply. Be cautious about unsolicited invitations, very broad topics, unrealistic deadlines, or claims of guaranteed publication. Also verify whether the issue's articles are indexed in the same way as regular content and whether the APC or licence differs.",
|
| 381 |
+
"topics": [
|
| 382 |
+
"special issue",
|
| 383 |
+
"guest editor",
|
| 384 |
+
"call for papers",
|
| 385 |
+
"invitation",
|
| 386 |
+
"themed issue"
|
| 387 |
+
],
|
| 388 |
+
"sources": [
|
| 389 |
+
{
|
| 390 |
+
"name": "DOAJ Principles of Transparency and Best Practice",
|
| 391 |
+
"url": "https://doaj.org/apply/transparency/"
|
| 392 |
+
},
|
| 393 |
+
{
|
| 394 |
+
"name": "COPE Core Principles",
|
| 395 |
+
"url": "https://publicationethics.org/core-principles"
|
| 396 |
+
}
|
| 397 |
+
],
|
| 398 |
+
"authority": "Publication ethics organizations",
|
| 399 |
+
"reviewed": "2026-09-09",
|
| 400 |
+
"review_cycle_days": 180
|
| 401 |
+
},
|
| 402 |
+
{
|
| 403 |
+
"id": "manuscript-readiness",
|
| 404 |
+
"category": "publishing",
|
| 405 |
+
"title": "Prepare the manuscript before selecting the final journal",
|
| 406 |
+
"summary": "Clarify the research question, contribution, methods, main findings, limitations, audience, and article type before finalizing a journal shortlist. Use the reporting guideline appropriate to the study design where one exists, and make the abstract and title accurately reflect the work. Resolve authorship and contributorship early, check ethical approvals and conflicts, organize data and code, and prepare a data-availability statement. A polished, complete manuscript gives journal-matching tools better evidence and reduces avoidable desk rejection.",
|
| 407 |
+
"topics": [
|
| 408 |
+
"manuscript preparation",
|
| 409 |
+
"reporting guideline",
|
| 410 |
+
"equator",
|
| 411 |
+
"desk rejection",
|
| 412 |
+
"data availability statement",
|
| 413 |
+
"authorship",
|
| 414 |
+
"contributorship"
|
| 415 |
+
],
|
| 416 |
+
"sources": [
|
| 417 |
+
{
|
| 418 |
+
"name": "EQUATOR reporting-guideline library",
|
| 419 |
+
"url": "https://www.equator-network.org/reporting-guidelines/"
|
| 420 |
+
},
|
| 421 |
+
{
|
| 422 |
+
"name": "CRediT Contributor Role Taxonomy",
|
| 423 |
+
"url": "https://credit.niso.org/contributor-roles-defined/"
|
| 424 |
+
}
|
| 425 |
+
],
|
| 426 |
+
"authority": "Reporting and contributorship standards",
|
| 427 |
+
"reviewed": "2026-09-09",
|
| 428 |
+
"review_cycle_days": 365
|
| 429 |
+
},
|
| 430 |
+
{
|
| 431 |
+
"id": "cover-letter-and-submission",
|
| 432 |
+
"category": "publishing",
|
| 433 |
+
"title": "Submission and cover-letter essentials",
|
| 434 |
+
"summary": "Follow the target journal's current author instructions exactly. A concise cover letter should identify the manuscript, state its central contribution and why it fits the journal's readership, confirm originality and submission status, and disclose any required ethics, conflicts, preprints, or related manuscripts. Do not repeat the entire abstract or make exaggerated claims. Before submission, confirm files, figures, tables, supplementary material, reporting checklist, author details, ORCID iDs, funding, contributor roles, and suggested or opposed reviewers where requested.",
|
| 435 |
+
"topics": [
|
| 436 |
+
"cover letter",
|
| 437 |
+
"submission checklist",
|
| 438 |
+
"author guidelines",
|
| 439 |
+
"orcid",
|
| 440 |
+
"credit roles",
|
| 441 |
+
"submit manuscript"
|
| 442 |
+
],
|
| 443 |
+
"sources": [
|
| 444 |
+
{
|
| 445 |
+
"name": "ORCID",
|
| 446 |
+
"url": "https://orcid.org/"
|
| 447 |
+
},
|
| 448 |
+
{
|
| 449 |
+
"name": "CRediT Contributor Role Taxonomy",
|
| 450 |
+
"url": "https://credit.niso.org/contributor-roles-defined/"
|
| 451 |
+
},
|
| 452 |
+
{
|
| 453 |
+
"name": "EQUATOR reporting-guideline library",
|
| 454 |
+
"url": "https://www.equator-network.org/reporting-guidelines/"
|
| 455 |
+
}
|
| 456 |
+
],
|
| 457 |
+
"authority": "Research identifiers and reporting standards",
|
| 458 |
+
"reviewed": "2026-09-09",
|
| 459 |
+
"review_cycle_days": 365
|
| 460 |
+
},
|
| 461 |
+
{
|
| 462 |
+
"id": "revision-and-peer-review-response",
|
| 463 |
+
"category": "publishing",
|
| 464 |
+
"title": "Responding to peer review",
|
| 465 |
+
"summary": "Read the decision letter and all reviews carefully, separate mandatory editorial requests from reviewer suggestions, and prepare a point-by-point response. Quote or summarize each comment, state exactly what changed and where, and explain respectfully when a requested change is not appropriate. Keep the revised manuscript, tracked or highlighted version, clean version, response letter, and supplementary files consistent. Never claim that a change was made when it was not, and alert the editor to conflicting or ethically problematic requests.",
|
| 466 |
+
"topics": [
|
| 467 |
+
"peer review response",
|
| 468 |
+
"revision letter",
|
| 469 |
+
"reviewer comments",
|
| 470 |
+
"major revision",
|
| 471 |
+
"minor revision",
|
| 472 |
+
"resubmit"
|
| 473 |
+
],
|
| 474 |
+
"sources": [
|
| 475 |
+
{
|
| 476 |
+
"name": "COPE Core Principles",
|
| 477 |
+
"url": "https://publicationethics.org/core-principles"
|
| 478 |
+
}
|
| 479 |
+
],
|
| 480 |
+
"authority": "Publication ethics guidance",
|
| 481 |
+
"reviewed": "2026-09-09",
|
| 482 |
+
"review_cycle_days": 365
|
| 483 |
+
},
|
| 484 |
+
{
|
| 485 |
+
"id": "open-access-versions",
|
| 486 |
+
"category": "open-access",
|
| 487 |
+
"title": "Preprint, accepted manuscript, and version of record",
|
| 488 |
+
"summary": "A preprint or submitted manuscript is the author's version before formal peer review. The accepted author manuscript, often called the AAM or postprint, includes changes made through peer review but not the publisher's final layout. The version of record is the final published version. Publisher policies often allow different versions in different repositories, sometimes with an embargo or required statement. Do not infer permission from another journal by the same publisher. Check the exact title, version, repository type, embargo, licence, acknowledgement, and effective policy date.",
|
| 489 |
+
"topics": [
|
| 490 |
+
"preprint",
|
| 491 |
+
"submitted version",
|
| 492 |
+
"accepted manuscript",
|
| 493 |
+
"aam",
|
| 494 |
+
"postprint",
|
| 495 |
+
"version of record",
|
| 496 |
+
"vor",
|
| 497 |
+
"manuscript version"
|
| 498 |
+
],
|
| 499 |
+
"sources": [
|
| 500 |
+
{
|
| 501 |
+
"name": "Open Policy Finder",
|
| 502 |
+
"url": "https://openpolicyfinder.jisc.ac.uk/"
|
| 503 |
+
},
|
| 504 |
+
{
|
| 505 |
+
"name": "KU Open Access guide",
|
| 506 |
+
"url": "https://library.ku.ac.ae/oa"
|
| 507 |
+
}
|
| 508 |
+
],
|
| 509 |
+
"authority": "Jisc and KU Library",
|
| 510 |
+
"reviewed": "2026-09-09",
|
| 511 |
+
"review_cycle_days": 90
|
| 512 |
+
},
|
| 513 |
+
{
|
| 514 |
+
"id": "open-policy-finder",
|
| 515 |
+
"category": "open-access",
|
| 516 |
+
"title": "Use Open Policy Finder for current journal and funder policies",
|
| 517 |
+
"summary": "Open Policy Finder supports searches for journal, publisher, and funder open-access policies, funder-compliance information, and transitional agreements. Because these records can change, ResearchBee should use the live API for a specific journal whenever possible and label the result with its source and retrieval date. The answer must keep separate the manuscript version, permitted repository, embargo, licence or required statement, and any policy option or exception. If no reliable record is returned, say that the permission is unverified and direct the user to the current journal policy or library support rather than guessing.",
|
| 518 |
+
"topics": [
|
| 519 |
+
"open policy finder",
|
| 520 |
+
"publisher policy",
|
| 521 |
+
"funder policy",
|
| 522 |
+
"transitional agreement",
|
| 523 |
+
"self archiving policy",
|
| 524 |
+
"embargo policy"
|
| 525 |
+
],
|
| 526 |
+
"sources": [
|
| 527 |
+
{
|
| 528 |
+
"name": "Open Policy Finder",
|
| 529 |
+
"url": "https://openpolicyfinder.jisc.ac.uk/"
|
| 530 |
+
},
|
| 531 |
+
{
|
| 532 |
+
"name": "Open Policy Finder API guidance",
|
| 533 |
+
"url": "https://openpolicyfinder.jisc.ac.uk/help/developers/how-to-access-the-api-platform"
|
| 534 |
+
}
|
| 535 |
+
],
|
| 536 |
+
"authority": "Jisc",
|
| 537 |
+
"reviewed": "2026-09-09",
|
| 538 |
+
"review_cycle_days": 30
|
| 539 |
+
},
|
| 540 |
+
{
|
| 541 |
+
"id": "green-oa-deposit-check",
|
| 542 |
+
"category": "open-access",
|
| 543 |
+
"title": "Green OA deposit decision checklist",
|
| 544 |
+
"summary": "Before depositing an article, identify the exact journal and article, confirm the manuscript version available, check the permitted repository type, calculate any embargo from the correct event, apply the required licence or acknowledgement, and retain evidence of the policy used. Keep repository-holdings status separate from permission status: an article being absent from Khazna does not mean it may be deposited, and an existing metadata record does not prove that a particular full-text version is permitted. Use DOI-first article-level checking when available.",
|
| 545 |
+
"topics": [
|
| 546 |
+
"green oa",
|
| 547 |
+
"deposit article",
|
| 548 |
+
"khazna deposit",
|
| 549 |
+
"self archive",
|
| 550 |
+
"repository rights",
|
| 551 |
+
"embargo calculation"
|
| 552 |
+
],
|
| 553 |
+
"sources": [
|
| 554 |
+
{
|
| 555 |
+
"name": "Open Policy Finder",
|
| 556 |
+
"url": "https://openpolicyfinder.jisc.ac.uk/"
|
| 557 |
+
},
|
| 558 |
+
{
|
| 559 |
+
"name": "KU Open Access guide",
|
| 560 |
+
"url": "https://library.ku.ac.ae/oa"
|
| 561 |
+
}
|
| 562 |
+
],
|
| 563 |
+
"authority": "Jisc and KU Library",
|
| 564 |
+
"reviewed": "2026-09-09",
|
| 565 |
+
"review_cycle_days": 90
|
| 566 |
+
},
|
| 567 |
+
{
|
| 568 |
+
"id": "rdm-overview-dmp",
|
| 569 |
+
"category": "rdm",
|
| 570 |
+
"title": "Research data management starts with a living plan",
|
| 571 |
+
"summary": "A data management plan should be created early and updated as the project changes. It should describe the data and formats, collection or creation methods, documentation and metadata, quality assurance, storage and backup, access control and security, ethics and legal constraints, responsibilities, sharing and repository plans, licences, retention and preservation, and required resources or costs. The plan should align with KU, funder, collaborator, ethics, contractual, and disciplinary requirements. A DMP is an operational plan, not merely a form completed for a proposal.",
|
| 572 |
+
"topics": [
|
| 573 |
+
"data management plan",
|
| 574 |
+
"dmp",
|
| 575 |
+
"rdm",
|
| 576 |
+
"research data management",
|
| 577 |
+
"storage",
|
| 578 |
+
"backup",
|
| 579 |
+
"data sharing plan"
|
| 580 |
+
],
|
| 581 |
+
"sources": [
|
| 582 |
+
{
|
| 583 |
+
"name": "KU Research Data guide",
|
| 584 |
+
"url": "https://library.ku.ac.ae/researchdata"
|
| 585 |
+
},
|
| 586 |
+
{
|
| 587 |
+
"name": "DMPonline guidance",
|
| 588 |
+
"url": "https://dmponline.dcc.ac.uk/help"
|
| 589 |
+
}
|
| 590 |
+
],
|
| 591 |
+
"authority": "KU Library and Digital Curation Centre",
|
| 592 |
+
"reviewed": "2026-09-09",
|
| 593 |
+
"review_cycle_days": 180
|
| 594 |
+
},
|
| 595 |
+
{
|
| 596 |
+
"id": "fair-principles",
|
| 597 |
+
"category": "rdm",
|
| 598 |
+
"title": "Apply FAIR principles appropriately",
|
| 599 |
+
"summary": "FAIR means Findable, Accessible, Interoperable, and Reusable. It does not mean that all data must be openly accessible. Sensitive or restricted data can still be FAIR when metadata are discoverable, access conditions are clear, identifiers are persistent, standards and vocabularies are used, provenance is recorded, and legitimate access routes are described. Practical FAIR actions include rich metadata, a persistent identifier, documented formats and variables, clear licences or access terms, links between data and publications, and use of disciplinary standards where available.",
|
| 600 |
+
"topics": [
|
| 601 |
+
"fair data",
|
| 602 |
+
"findable accessible interoperable reusable",
|
| 603 |
+
"fair principles",
|
| 604 |
+
"machine actionable",
|
| 605 |
+
"open data"
|
| 606 |
+
],
|
| 607 |
+
"sources": [
|
| 608 |
+
{
|
| 609 |
+
"name": "GO FAIR principles",
|
| 610 |
+
"url": "https://www.go-fair.org/fair-principles/"
|
| 611 |
+
},
|
| 612 |
+
{
|
| 613 |
+
"name": "KU Research Data guide",
|
| 614 |
+
"url": "https://library.ku.ac.ae/researchdata"
|
| 615 |
+
}
|
| 616 |
+
],
|
| 617 |
+
"authority": "FAIR principles and KU Library",
|
| 618 |
+
"reviewed": "2026-09-09",
|
| 619 |
+
"review_cycle_days": 365
|
| 620 |
+
},
|
| 621 |
+
{
|
| 622 |
+
"id": "repository-selection-workflow",
|
| 623 |
+
"category": "repositories",
|
| 624 |
+
"title": "How to choose a research-data repository",
|
| 625 |
+
"summary": "Start with funder, publisher, ethics, collaboration, and institutional requirements. Prefer a reputable disciplinary repository when it serves the relevant community and accepts the data; otherwise consider a suitable generalist or institutional repository. Check scope, accepted content and formats, maximum size, costs, access options and embargoes, sensitive-data controls, licences, metadata quality, persistent identifiers, versioning, links to publications, review or curation, preservation commitment, withdrawal and tombstone policies, and export or API options. Verify all terms on the repository's current site before deposit.",
|
| 626 |
+
"topics": [
|
| 627 |
+
"choose repository",
|
| 628 |
+
"data repository",
|
| 629 |
+
"where to deposit data",
|
| 630 |
+
"repository criteria",
|
| 631 |
+
"generalist repository",
|
| 632 |
+
"disciplinary repository"
|
| 633 |
+
],
|
| 634 |
+
"sources": [
|
| 635 |
+
{
|
| 636 |
+
"name": "KU Research Data guide",
|
| 637 |
+
"url": "https://library.ku.ac.ae/researchdata"
|
| 638 |
+
},
|
| 639 |
+
{
|
| 640 |
+
"name": "re3data",
|
| 641 |
+
"url": "https://www.re3data.org/"
|
| 642 |
+
},
|
| 643 |
+
{
|
| 644 |
+
"name": "FAIRsharing",
|
| 645 |
+
"url": "https://fairsharing.org/"
|
| 646 |
+
},
|
| 647 |
+
{
|
| 648 |
+
"name": "CoreTrustSeal",
|
| 649 |
+
"url": "https://www.coretrustseal.org/"
|
| 650 |
+
}
|
| 651 |
+
],
|
| 652 |
+
"authority": "KU Library and repository registries",
|
| 653 |
+
"reviewed": "2026-09-09",
|
| 654 |
+
"review_cycle_days": 90
|
| 655 |
+
},
|
| 656 |
+
{
|
| 657 |
+
"id": "disciplinary-vs-generalist-repository",
|
| 658 |
+
"category": "repositories",
|
| 659 |
+
"title": "Disciplinary, generalist, and institutional repositories",
|
| 660 |
+
"summary": "A disciplinary repository is often the strongest choice when it is trusted by the research community, supports appropriate metadata and file types, and is recognized by the funder or journal. A generalist repository can be suitable when no disciplinary repository fits or when mixed outputs need a common home. An institutional repository supports local stewardship and visibility but may have different collection scope, access controls, or data functionality. More than one service may be used when policies permit, but avoid creating ambiguous duplicate records; connect versions with persistent identifiers and clearly identify the authoritative record.",
|
| 661 |
+
"topics": [
|
| 662 |
+
"disciplinary repository",
|
| 663 |
+
"subject repository",
|
| 664 |
+
"generalist repository",
|
| 665 |
+
"institutional repository",
|
| 666 |
+
"khazna",
|
| 667 |
+
"zenodo",
|
| 668 |
+
"dryad",
|
| 669 |
+
"figshare"
|
| 670 |
+
],
|
| 671 |
+
"sources": [
|
| 672 |
+
{
|
| 673 |
+
"name": "re3data",
|
| 674 |
+
"url": "https://www.re3data.org/"
|
| 675 |
+
},
|
| 676 |
+
{
|
| 677 |
+
"name": "KU Research Data guide",
|
| 678 |
+
"url": "https://library.ku.ac.ae/researchdata"
|
| 679 |
+
}
|
| 680 |
+
],
|
| 681 |
+
"authority": "Repository registry and KU Library",
|
| 682 |
+
"reviewed": "2026-09-09",
|
| 683 |
+
"review_cycle_days": 180
|
| 684 |
+
},
|
| 685 |
+
{
|
| 686 |
+
"id": "repository-trust-and-certification",
|
| 687 |
+
"category": "repositories",
|
| 688 |
+
"title": "Repository trust, preservation, and certification",
|
| 689 |
+
"summary": "Trust depends on evidence such as a clear mission and governance, sustainable staffing and funding, transparent licences and terms, data integrity and authenticity controls, documented ingest and preservation workflows, security, access management, metadata and discovery, continuity planning, and support for the designated community. CoreTrustSeal certification is useful evidence that a repository has been assessed against core trustworthy-repository requirements, but lack of certification does not automatically make a repository unsuitable. Evaluate the repository's actual services and the needs of the dataset.",
|
| 690 |
+
"topics": [
|
| 691 |
+
"coretrustseal",
|
| 692 |
+
"trusted repository",
|
| 693 |
+
"trustworthy repository",
|
| 694 |
+
"preservation",
|
| 695 |
+
"certification",
|
| 696 |
+
"repository sustainability"
|
| 697 |
+
],
|
| 698 |
+
"sources": [
|
| 699 |
+
{
|
| 700 |
+
"name": "CoreTrustSeal requirements",
|
| 701 |
+
"url": "https://www.coretrustseal.org/why-certification/requirements/"
|
| 702 |
+
},
|
| 703 |
+
{
|
| 704 |
+
"name": "re3data",
|
| 705 |
+
"url": "https://www.re3data.org/"
|
| 706 |
+
}
|
| 707 |
+
],
|
| 708 |
+
"authority": "Repository certification and registry",
|
| 709 |
+
"reviewed": "2026-09-09",
|
| 710 |
+
"review_cycle_days": 365
|
| 711 |
+
},
|
| 712 |
+
{
|
| 713 |
+
"id": "repository-registries",
|
| 714 |
+
"category": "repositories",
|
| 715 |
+
"title": "Use repository registries to discover candidates, then verify",
|
| 716 |
+
"summary": "re3data can be searched or accessed programmatically to discover repositories by subject, country, content type, access, identifiers, certification, and other recorded attributes. FAIRsharing links repositories, standards, and data policies. Registry records are discovery aids, not substitutes for checking the repository's own current terms. ResearchBee should use registry identifiers to shortlist repositories and then present direct verification links for deposit rules, costs, size limits, licences, sensitive-data support, identifiers, and preservation.",
|
| 717 |
+
"topics": [
|
| 718 |
+
"re3data",
|
| 719 |
+
"fairsharing",
|
| 720 |
+
"repository registry",
|
| 721 |
+
"repository directory",
|
| 722 |
+
"repository api",
|
| 723 |
+
"find repository"
|
| 724 |
+
],
|
| 725 |
+
"sources": [
|
| 726 |
+
{
|
| 727 |
+
"name": "re3data",
|
| 728 |
+
"url": "https://www.re3data.org/"
|
| 729 |
+
},
|
| 730 |
+
{
|
| 731 |
+
"name": "re3data API",
|
| 732 |
+
"url": "https://www.re3data.org/api/doc/"
|
| 733 |
+
},
|
| 734 |
+
{
|
| 735 |
+
"name": "FAIRsharing",
|
| 736 |
+
"url": "https://fairsharing.org/"
|
| 737 |
+
}
|
| 738 |
+
],
|
| 739 |
+
"authority": "Repository registries",
|
| 740 |
+
"reviewed": "2026-09-09",
|
| 741 |
+
"review_cycle_days": 90
|
| 742 |
+
},
|
| 743 |
+
{
|
| 744 |
+
"id": "data-documentation-metadata-formats",
|
| 745 |
+
"category": "rdm",
|
| 746 |
+
"title": "Documentation, metadata, file formats, and README files",
|
| 747 |
+
"summary": "A reusable dataset needs enough documentation for someone outside the project to understand what the files contain, how the data were created or processed, units and codes, missing values, software and version dependencies, quality checks, file relationships, and known limitations. Use a disciplinary metadata standard and controlled vocabularies when available. Prefer open, well-documented, non-proprietary or widely supported preservation formats when practical, while retaining necessary original files. Include a README, data dictionary or codebook, licence or access terms, provenance, and links to related software, protocols, and publications.",
|
| 748 |
+
"topics": [
|
| 749 |
+
"metadata",
|
| 750 |
+
"readme",
|
| 751 |
+
"data dictionary",
|
| 752 |
+
"codebook",
|
| 753 |
+
"file format",
|
| 754 |
+
"documentation",
|
| 755 |
+
"controlled vocabulary",
|
| 756 |
+
"provenance"
|
| 757 |
+
],
|
| 758 |
+
"sources": [
|
| 759 |
+
{
|
| 760 |
+
"name": "GO FAIR principles",
|
| 761 |
+
"url": "https://www.go-fair.org/fair-principles/"
|
| 762 |
+
},
|
| 763 |
+
{
|
| 764 |
+
"name": "KU Research Data guide",
|
| 765 |
+
"url": "https://library.ku.ac.ae/researchdata"
|
| 766 |
+
}
|
| 767 |
+
],
|
| 768 |
+
"authority": "FAIR principles and KU Library",
|
| 769 |
+
"reviewed": "2026-09-09",
|
| 770 |
+
"review_cycle_days": 365
|
| 771 |
+
},
|
| 772 |
+
{
|
| 773 |
+
"id": "sensitive-data",
|
| 774 |
+
"category": "rdm",
|
| 775 |
+
"title": "Sensitive, confidential, personal, and restricted data",
|
| 776 |
+
"summary": "Do not upload sensitive or restricted data to a public repository merely to satisfy an open-data expectation. Follow ethics approval, informed consent, applicable law, KU policy, contracts, data-use agreements, and funder requirements. Consider data minimization, de-identification or anonymization, separation of identifiers, encryption, role-based access, secure transfer, retention and destruction rules, and controlled access. When data cannot be shared openly, publish a metadata record and a clear access statement where permitted, explaining what can be requested, by whom, under which conditions, and who reviews requests.",
|
| 777 |
+
"topics": [
|
| 778 |
+
"sensitive data",
|
| 779 |
+
"personal data",
|
| 780 |
+
"confidential",
|
| 781 |
+
"patient data",
|
| 782 |
+
"controlled access",
|
| 783 |
+
"anonymization",
|
| 784 |
+
"de-identification",
|
| 785 |
+
"ethics"
|
| 786 |
+
],
|
| 787 |
+
"sources": [
|
| 788 |
+
{
|
| 789 |
+
"name": "KU Research Data guide",
|
| 790 |
+
"url": "https://library.ku.ac.ae/researchdata"
|
| 791 |
+
},
|
| 792 |
+
{
|
| 793 |
+
"name": "CoreTrustSeal requirements",
|
| 794 |
+
"url": "https://www.coretrustseal.org/why-certification/requirements/"
|
| 795 |
+
}
|
| 796 |
+
],
|
| 797 |
+
"authority": "KU Library and trustworthy repository guidance",
|
| 798 |
+
"reviewed": "2026-09-09",
|
| 799 |
+
"review_cycle_days": 90
|
| 800 |
+
},
|
| 801 |
+
{
|
| 802 |
+
"id": "data-licensing-citation-pids",
|
| 803 |
+
"category": "rdm",
|
| 804 |
+
"title": "Data licences, citation, and persistent identifiers",
|
| 805 |
+
"summary": "A data licence should match what the depositor is legally able and intends to permit; ownership, third-party material, consent, contracts, and database rights must be checked first. A persistent identifier such as a DOI helps users find and cite a stable dataset record, but persistence also requires the repository to maintain the landing page and metadata. Dataset citations should identify creators, year, title, repository or publisher, version where relevant, and persistent identifier. Link the dataset and article in both directions and document how updated versions relate to earlier ones.",
|
| 806 |
+
"topics": [
|
| 807 |
+
"data licence",
|
| 808 |
+
"data license",
|
| 809 |
+
"dataset doi",
|
| 810 |
+
"persistent identifier",
|
| 811 |
+
"pid",
|
| 812 |
+
"data citation",
|
| 813 |
+
"cite dataset",
|
| 814 |
+
"versioning"
|
| 815 |
+
],
|
| 816 |
+
"sources": [
|
| 817 |
+
{
|
| 818 |
+
"name": "DataCite DOI basics",
|
| 819 |
+
"url": "https://support.datacite.org/docs/doi-basics"
|
| 820 |
+
},
|
| 821 |
+
{
|
| 822 |
+
"name": "DataCite data citation",
|
| 823 |
+
"url": "https://support.datacite.org/docs/data-citation"
|
| 824 |
+
},
|
| 825 |
+
{
|
| 826 |
+
"name": "GO FAIR principles",
|
| 827 |
+
"url": "https://www.go-fair.org/fair-principles/"
|
| 828 |
+
}
|
| 829 |
+
],
|
| 830 |
+
"authority": "DataCite and FAIR principles",
|
| 831 |
+
"reviewed": "2026-09-09",
|
| 832 |
+
"review_cycle_days": 365
|
| 833 |
+
},
|
| 834 |
+
{
|
| 835 |
+
"id": "data-versioning-and-preservation",
|
| 836 |
+
"category": "rdm",
|
| 837 |
+
"title": "Version datasets and plan for preservation",
|
| 838 |
+
"summary": "Decide what constitutes a new dataset version and record the change history. Minor metadata corrections may not require the same treatment as changes to files or data values; follow the repository's versioning model. Keep identifiers and relationships clear so users can locate the latest version and reproduce the version cited in a paper. Preservation planning should identify which data, software, documentation, and formats must be retained, for how long, who is responsible, and how integrity, migration, access, and repository continuity will be managed.",
|
| 839 |
+
"topics": [
|
| 840 |
+
"data version",
|
| 841 |
+
"dataset versioning",
|
| 842 |
+
"preservation",
|
| 843 |
+
"retention",
|
| 844 |
+
"checksums",
|
| 845 |
+
"tombstone",
|
| 846 |
+
"long term access"
|
| 847 |
+
],
|
| 848 |
+
"sources": [
|
| 849 |
+
{
|
| 850 |
+
"name": "CoreTrustSeal requirements",
|
| 851 |
+
"url": "https://www.coretrustseal.org/why-certification/requirements/"
|
| 852 |
+
},
|
| 853 |
+
{
|
| 854 |
+
"name": "DataCite DOI persistence",
|
| 855 |
+
"url": "https://support.datacite.org/docs/doi-persistence"
|
| 856 |
+
}
|
| 857 |
+
],
|
| 858 |
+
"authority": "Repository trust and PID guidance",
|
| 859 |
+
"reviewed": "2026-09-09",
|
| 860 |
+
"review_cycle_days": 365
|
| 861 |
+
},
|
| 862 |
+
{
|
| 863 |
+
"id": "orcid-and-credit",
|
| 864 |
+
"category": "publishing",
|
| 865 |
+
"title": "Use ORCID and CRediT for identity and contributions",
|
| 866 |
+
"summary": "An ORCID iD is a persistent identifier for an individual researcher and helps connect the person with affiliations, publications, datasets, funding, peer review, and other research activities across systems. CRediT is a taxonomy of 14 contributor roles that can describe who did what in a research output. CRediT complements rather than decides authorship. Confirm authorship and author order using the relevant journal and disciplinary criteria, obtain agreement from all contributors, and keep contributor statements accurate and consistent across submission systems and the manuscript.",
|
| 867 |
+
"topics": [
|
| 868 |
+
"orcid",
|
| 869 |
+
"credit taxonomy",
|
| 870 |
+
"contributor roles",
|
| 871 |
+
"authorship",
|
| 872 |
+
"author order",
|
| 873 |
+
"researcher identifier"
|
| 874 |
+
],
|
| 875 |
+
"sources": [
|
| 876 |
+
{
|
| 877 |
+
"name": "ORCID",
|
| 878 |
+
"url": "https://orcid.org/"
|
| 879 |
+
},
|
| 880 |
+
{
|
| 881 |
+
"name": "CRediT Contributor Role Taxonomy",
|
| 882 |
+
"url": "https://credit.niso.org/"
|
| 883 |
+
}
|
| 884 |
+
],
|
| 885 |
+
"authority": "Research identifier and contributorship standards",
|
| 886 |
+
"reviewed": "2026-09-09",
|
| 887 |
+
"review_cycle_days": 365
|
| 888 |
+
},
|
| 889 |
+
{
|
| 890 |
+
"id": "responsible-ai-for-research",
|
| 891 |
+
"category": "ai",
|
| 892 |
+
"title": "Use AI tools responsibly in research and publishing",
|
| 893 |
+
"summary": "Use only tools appropriate for the sensitivity and confidentiality of the material. Do not upload unpublished manuscripts, personal data, confidential peer-review material, or restricted research information to an unapproved service. Verify every generated reference, quotation, factual claim, calculation, and summary against the original source. Human authors remain responsible for accuracy, originality, attribution, ethics, and compliance. Check the target journal, funder, and KU requirements for disclosure of AI-assisted work, and describe material use transparently when required.",
|
| 894 |
+
"topics": [
|
| 895 |
+
"ai tools",
|
| 896 |
+
"generative ai",
|
| 897 |
+
"chatgpt",
|
| 898 |
+
"ai disclosure",
|
| 899 |
+
"hallucinated references",
|
| 900 |
+
"confidential manuscript",
|
| 901 |
+
"responsible ai"
|
| 902 |
+
],
|
| 903 |
+
"sources": [
|
| 904 |
+
{
|
| 905 |
+
"name": "KU AI Tools guide",
|
| 906 |
+
"url": "https://library.ku.ac.ae/aitools"
|
| 907 |
+
},
|
| 908 |
+
{
|
| 909 |
+
"name": "COPE AI in publishing resources",
|
| 910 |
+
"url": "https://publicationethics.org/"
|
| 911 |
+
}
|
| 912 |
+
],
|
| 913 |
+
"authority": "KU Library and publication ethics guidance",
|
| 914 |
+
"reviewed": "2026-09-09",
|
| 915 |
+
"review_cycle_days": 90
|
| 916 |
+
},
|
| 917 |
+
{
|
| 918 |
+
"id": "research-analytics-tools",
|
| 919 |
+
"category": "analytics",
|
| 920 |
+
"title": "Choose the right research analytics tool",
|
| 921 |
+
"summary": "Use Scopus or Web of Science for source verification, citation searching, author and organization profiles, and journal-level metrics available in each database. Use Journal Citation Reports for JIF, JCI, category benchmarks, and related journal intelligence. Use SciVal for broader institutional, collaboration, topic, and benchmarking analyses based on Scopus data. Results differ because databases have different coverage, data models, disambiguation, and update schedules. State the database, retrieval date, search strategy, filters, and metric definitions in any formal analysis.",
|
| 922 |
+
"topics": [
|
| 923 |
+
"scopus",
|
| 924 |
+
"web of science",
|
| 925 |
+
"scival",
|
| 926 |
+
"research analytics",
|
| 927 |
+
"citation analysis",
|
| 928 |
+
"h index",
|
| 929 |
+
"fwci",
|
| 930 |
+
"benchmarking"
|
| 931 |
+
],
|
| 932 |
+
"sources": [
|
| 933 |
+
{
|
| 934 |
+
"name": "KU Journal Finder guide",
|
| 935 |
+
"url": "https://library.ku.ac.ae/journalfinder"
|
| 936 |
+
},
|
| 937 |
+
{
|
| 938 |
+
"name": "Clarivate Journal Citation Reports",
|
| 939 |
+
"url": "https://clarivate.com/academia-government/scientific-and-academic-research/research-funding-analytics/journal-citation-reports/"
|
| 940 |
+
},
|
| 941 |
+
{
|
| 942 |
+
"name": "Scopus",
|
| 943 |
+
"url": "https://www.scopus.com/"
|
| 944 |
+
}
|
| 945 |
+
],
|
| 946 |
+
"authority": "KU Library and database providers",
|
| 947 |
+
"reviewed": "2026-09-09",
|
| 948 |
+
"review_cycle_days": 180
|
| 949 |
+
}
|
| 950 |
+
]
|
| 951 |
+
}
|
openpolicyfinder.py
CHANGED
|
@@ -55,7 +55,7 @@ LICENCE_NAME = "CC BY-NC-ND 4.0"
|
|
| 55 |
LICENCE_URL = "https://creativecommons.org/licenses/by-nc-nd/4.0/"
|
| 56 |
CONTACT = "nikesh.narayanan@ku.ac.ae"
|
| 57 |
USER_AGENT = (
|
| 58 |
-
"ResearchBee/1.
|
| 59 |
f"mailto:{CONTACT}; Open Policy Finder API client)"
|
| 60 |
)
|
| 61 |
|
|
|
|
| 55 |
LICENCE_URL = "https://creativecommons.org/licenses/by-nc-nd/4.0/"
|
| 56 |
CONTACT = "nikesh.narayanan@ku.ac.ae"
|
| 57 |
USER_AGENT = (
|
| 58 |
+
"ResearchBee/1.7.0 (Khalifa University Library; "
|
| 59 |
f"mailto:{CONTACT}; Open Policy Finder API client)"
|
| 60 |
)
|
| 61 |
|
prompts.py
CHANGED
|
@@ -236,70 +236,76 @@ The cover letter should be professional, concise (250-350 words), and highlight:
|
|
| 236 |
|
| 237 |
# ββ Chat assistant ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 238 |
# KU knowledge base is injected dynamically in app.py
|
| 239 |
-
CHAT_SYSTEM_PROMPT_BASE = """You are ResearchBee
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
-
|
| 243 |
-
-
|
| 244 |
-
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
-
|
| 261 |
-
-
|
| 262 |
-
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
-
|
| 266 |
-
|
| 267 |
-
-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
-
|
| 271 |
-
-
|
| 272 |
-
-
|
| 273 |
-
|
| 274 |
-
-
|
| 275 |
-
-
|
| 276 |
-
-
|
| 277 |
-
-
|
| 278 |
-
-
|
| 279 |
-
|
| 280 |
-
-
|
| 281 |
-
|
| 282 |
-
|
| 283 |
-
|
| 284 |
-
|
| 285 |
-
|
| 286 |
-
|
| 287 |
-
|
| 288 |
-
|
| 289 |
-
|
| 290 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 291 |
{"route": "journals"|"license"|"data"|null, "prefill": {}}
|
| 292 |
-
-
|
| 293 |
|
| 294 |
-
|
| 295 |
-
|
| 296 |
-
"Find me journals for AI research" β brief answer + {"route": "journals", "prefill": {"discipline": "Artificial Intelligence"}}
|
| 297 |
-
"Can I self-archive in Nature?" β brief note + {"route": "license", "prefill": {"journal_name": "Nature"}}
|
| 298 |
-
"What is Green OA?" β explain briefly + link to openpolicyfinder.jisc.ac.uk, {"route": null, "prefill": {}}
|
| 299 |
-
"Who do I contact for publishing help at KU?" β Nikesh Narayanan + email, {"route": null, "prefill": {}}
|
| 300 |
|
| 301 |
-
|
| 302 |
-
{
|
| 303 |
-
|
| 304 |
-
βββ OPEN POLICY FINDER DATA (if available) βββ
|
| 305 |
-
{OPF_DATA}"""
|
|
|
|
| 236 |
|
| 237 |
# ββ Chat assistant ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 238 |
# KU knowledge base is injected dynamically in app.py
|
| 239 |
+
CHAT_SYSTEM_PROMPT_BASE = """You are ResearchBee, the AI publishing and research-data assistant for Khalifa University Library.
|
| 240 |
+
|
| 241 |
+
=== PERSONALITY AND RESPONSE STYLE ===
|
| 242 |
+
- Be friendly, precise, practical, and concise. Expand when the user asks for a comparison, workflow, or explanation.
|
| 243 |
+
- Use plain language first; define specialist terms such as CiteScore, JIF, AAM, DOI, DMP, and FAIR.
|
| 244 |
+
- Never present a ranking, policy, fee, agreement, repository term, or eligibility rule as current unless the supplied context supports it.
|
| 245 |
+
|
| 246 |
+
=== SOURCE PRIORITY ===
|
| 247 |
+
Use evidence in this order:
|
| 248 |
+
1. Live Open Policy Finder data supplied below for the exact journal or policy question.
|
| 249 |
+
2. Relevant KU Library knowledge retrieved for this question.
|
| 250 |
+
3. Curated external guidance retrieved for this question.
|
| 251 |
+
4. Stable general scholarly-communication knowledge only when the first three do not answer the question.
|
| 252 |
+
If sources conflict, explain the conflict and give priority to the current first-party or live source.
|
| 253 |
+
|
| 254 |
+
=== IMPORTANT CAPABILITY LIMIT ===
|
| 255 |
+
- This chat endpoint does not have unrestricted web browsing. Never say or imply that you searched the web.
|
| 256 |
+
- When a time-sensitive fact is not in the supplied context, say that it could not be confirmed here and provide the exact verification source from the context.
|
| 257 |
+
- Never invent a URL. Use only URLs supplied in the retrieved knowledge, live policy data, or conversation.
|
| 258 |
+
|
| 259 |
+
=== WHAT YOU CAN HELP WITH ===
|
| 260 |
+
- KU Open Access policy, APC support, publisher agreements, Khazna, and KU Library research services.
|
| 261 |
+
- Journal selection: scope and audience fit, indexing, metrics, quartiles, open-access options, trust checks, and submission preparation.
|
| 262 |
+
- Article sharing: preprint, accepted manuscript, version of record, embargoes, licences, and repository conditions.
|
| 263 |
+
- Research data management: DMPs, FAIR practice, metadata, sensitive data, licensing, data citation, and repository selection.
|
| 264 |
+
- Publishing practice: reporting guidelines, authorship and contributorship, ORCID, cover letters, peer review, revisions, and publication ethics.
|
| 265 |
+
- Responsible use of AI tools in research and publishing.
|
| 266 |
+
|
| 267 |
+
=== JOURNAL-SELECTION RULES ===
|
| 268 |
+
- Fit comes before rank: consider scope, recent articles, audience, methods, article type, and contribution.
|
| 269 |
+
- Explain metrics as complementary evidence. Never call a journal the best solely because it is Q1, has a high CiteScore, or has a high Journal Impact Factor.
|
| 270 |
+
- For every metric or quartile, identify the database, year, and subject category when they are available.
|
| 271 |
+
- Do not compare raw CiteScore or JIF values across unrelated fields without appropriate context.
|
| 272 |
+
- Verify indexing, active or discontinued status, fees, licences, and publisher claims at their primary sources.
|
| 273 |
+
|
| 274 |
+
=== OPEN-ACCESS AND POLICY RULES ===
|
| 275 |
+
- Keep preprint, accepted author manuscript, and version of record separate.
|
| 276 |
+
- Keep permission, embargo, licence, repository type, required statement, and holdings status separate.
|
| 277 |
+
- Missing information means unknown, not allowed and not prohibited.
|
| 278 |
+
- For a specific journal, use live Open Policy Finder data when supplied and state any limits or unresolved fields.
|
| 279 |
+
|
| 280 |
+
=== RESEARCH-DATA RULES ===
|
| 281 |
+
- Prefer a suitable disciplinary repository when requirements and community practice support it; otherwise consider a trusted generalist or institutional repository.
|
| 282 |
+
- Check scope, formats, size, cost, licences, access controls, embargoes, sensitive-data support, persistent identifiers, versioning, preservation, and funder or publisher requirements.
|
| 283 |
+
- FAIR does not automatically mean open. Restricted data can be FAIR when metadata and access conditions are clear.
|
| 284 |
+
|
| 285 |
+
=== ROUTING RULES ===
|
| 286 |
+
ResearchBee has three structured tools:
|
| 287 |
+
1. journals - find and compare journals or analyse a manuscript
|
| 288 |
+
2. license - check article sharing and self-archiving rights
|
| 289 |
+
3. data - match a dataset to suitable repositories
|
| 290 |
+
|
| 291 |
+
- Answer educational questions directly, including questions such as "How do I choose a journal?", "What is Q1?", "What is FAIR data?", and "How does an embargo work?"
|
| 292 |
+
- Route when the user asks ResearchBee to perform a structured task, such as finding journals for a manuscript, checking a named article or journal policy, or matching a dataset to repositories.
|
| 293 |
+
- A direct answer may still end with a useful tool route when the next practical step is clear.
|
| 294 |
+
|
| 295 |
+
=== LINKS AND PROVENANCE ===
|
| 296 |
+
- Include one to three directly relevant source links when they add value. Write the source name and then its exact URL so the frontend can make it clickable.
|
| 297 |
+
- Distinguish live verified data from curated guidance and from anything that remains unverified.
|
| 298 |
+
- Do not overwhelm the user with a long bibliography unless requested.
|
| 299 |
+
|
| 300 |
+
=== RESPONSE FORMAT ===
|
| 301 |
+
- Write conversational text, not JSON.
|
| 302 |
+
- End every response with exactly one routing object on its own line:
|
| 303 |
{"route": "journals"|"license"|"data"|null, "prefill": {}}
|
| 304 |
+
- Do not discuss this routing object in the visible answer.
|
| 305 |
|
| 306 |
+
=== RETRIEVED KNOWLEDGE FOR THIS QUESTION ===
|
| 307 |
+
{RETRIEVED_KNOWLEDGE}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 308 |
|
| 309 |
+
=== LIVE OPEN POLICY FINDER DATA, IF AVAILABLE ===
|
| 310 |
+
{OPF_DATA}
|
| 311 |
+
"""
|
|
|
|
|
|