From 92d3ee2ff004ea32e0b07dfc101a77d76f3b694d Mon Sep 17 00:00:00 2001 From: Shishir Patil <30296397+ShishirPatil@users.noreply.github.com> Date: Sat, 13 Apr 2024 20:43:22 -0700 Subject: [PATCH] Update raft.py with default `p` to match paper Change `p` which dictates the fraction of dataset with golden documents in them (vs) no golden documents. So, p = 0.8 means, for 80% of the train data set, `A* = Q + D* + D1 .. Dn` and for 20% of the train data set `A* = Q + D1 .. Dn` where `D*` are/is the golden document with the answer `A*`. --- raft/raft.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raft/raft.py b/raft/raft.py index 4280579d5..9b07e0c23 100644 --- a/raft/raft.py +++ b/raft/raft.py @@ -185,7 +185,7 @@ def add_chunk_to_dataset( doctype: DocType = "api", x: int = 5, num_distract: int = 3, - p: float = 1.0 + p: float = 0.8 ) -> None: """ Given a chunk, create {Q, A, D} triplets and add them to the dataset.