Siddh12334 commited on
Commit
bdb156f
·
1 Parent(s): e5661c5

feat: initial structure

Browse files
Dockerfile ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+ WORKDIR /app
3
+ COPY requirements.txt .
4
+ RUN pip install --no-cache-dir -r requirements.txt
5
+ COPY . .
6
+ RUN python -c "from data.loader import build_fact_database; build_fact_database()" || true
7
+ EXPOSE 7860
8
+ CMD ["uvicorn", "environment.server:app", "--host", "0.0.0.0", "--port", "7860"]
data/corruption.py ADDED
File without changes
data/generator.py ADDED
File without changes
data/loader.py ADDED
File without changes
environment/__init__.py ADDED
File without changes
environment/actions.py ADDED
File without changes
environment/env.py ADDED
File without changes
environment/reward.py ADDED
File without changes
environment/server.py ADDED
File without changes
eval/baseline_eval.py ADDED
File without changes
openenv.yaml ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: context-corruption-env
2
+ version: "1.0.0"
3
+ description: >
4
+ OpenEnv environment for training epistemic robustness in LLMs.
5
+ Agents identify correct answers and flag corrupted documents
6
+ in a multi-doc QA setting with verifiable, objective rewards.
7
+ author: "Your Team Name"
8
+ license: MIT
9
+
10
+ environment:
11
+ entrypoint: "environment.server:app"
12
+ action_schema: "environment.actions.ContextCorruptionAction"
13
+ observation_schema: "environment.actions.EpisodeObservation"
14
+ max_concurrent_sessions: 64
15
+
16
+ reward:
17
+ type: "objective"
18
+ range: [-0.5, 1.05]
19
+ components:
20
+ - {name: answer_correctness, weight: 0.4}
21
+ - {name: corruption_detection, weight: 0.3}
22
+ - {name: false_positive_penalty, weight: 0.2}
23
+ - {name: confidence_calibration, weight: 0.1}
24
+
25
+ datasets:
26
+ - {name: Natural Questions, url: "https://huggingface.co/datasets/google-research-datasets/natural_questions"}
27
+ - {name: PopQA, url: "https://huggingface.co/datasets/akariasai/PopQA"}
28
+ - {name: FaithEval, url: "https://github.com/SalesforceAIResearch/FaithEval"}
29
+
30
+ citation: |
31
+ @misc{contextcorruption2026,
32
+ title={ContextCorruption-Env: Training Epistemic Robustness in LLMs},
33
+ year={2026},
34
+ note={OpenEnv Hackathon Submission}
35
+ }
training/train_grpo.py ADDED
File without changes