{
  "_id": "6a61b842f673e46fff56e5a4",
  "Package": "ragR",
  "Title": "Retrieval-Augmented Generation and RAG Evaluation Tools in R",
  "Version": "0.0.0.9000",
  "Authors@R": "c(\nperson(\"Muhammad Aimal\", \"Rehman\", email = \"rehman.aimal@gmail.com\",\nrole = c(\"aut\", \"cre\")),\nperson(\"Zhili\", \"Lu\", role = \"aut\"),\nperson(\"Chi-Kuang\", \"Yeh\", role = \"aut\")\n)",
  "Description": "Tools for data ingestion, embedding storage,\nretrieval-augmented generation (RAG), and LLM-scored\nRAGAS-style evaluation for question answering systems using\nOpenAI models and a simple R-native vector store.",
  "License": "GPL-3",
  "Encoding": "UTF-8",
  "Roxygen": "list(markdown = TRUE)",
  "RoxygenNote": "7.3.3",
  "Config/testthat/edition": "3",
  "Repository": "https://aimalrehman92.r-universe.dev",
  "Date/Publication": "2026-04-24 09:07:30 UTC",
  "RemoteUrl": "https://github.com/aimalrehman92/ragr",
  "RemoteRef": "HEAD",
  "RemoteSha": "b81068fc089ed1258b9b86536f71768710ca41e3",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-07-23 06:41:20 UTC",
    "User": "root"
  },
  "Author": "Muhammad Aimal Rehman [aut, cre],\nZhili Lu [aut],\nChi-Kuang Yeh [aut]",
  "Maintainer": "Muhammad Aimal Rehman <rehman.aimal@gmail.com>",
  "_user": "aimalrehman92",
  "_type": "src",
  "_file": "ragR_0.0.0.9000.tar.gz",
  "_fileid": "https://r2.ropensci.org/1fc6f2bf77a25774e3d8e77b7d744e6df6c3ddc8f116c7de0cfd453ec0711389",
  "_filesize": 205233,
  "_sha256": "1fc6f2bf77a25774e3d8e77b7d744e6df6c3ddc8f116c7de0cfd453ec0711389",
  "_expires": "2026-10-31T06:44:16.000Z",
  "_created": "2026-07-23T06:41:20.000Z",
  "_published": "2026-07-23T06:44:18.422Z",
  "_jobs": [
    {
      "job": 89137337213,
      "time": 128,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "ERROR",
      "artifact": "8554988452"
    },
    {
      "job": 89137337091,
      "time": 131,
      "config": "linux-release-x86_64",
      "r": "4.6.1",
      "check": "ERROR",
      "artifact": "8554989950"
    },
    {
      "job": 89137337112,
      "time": 134,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "ERROR",
      "artifact": "8554990603"
    },
    {
      "job": 89137337077,
      "time": 110,
      "config": "macos-release-arm64",
      "r": "4.6.1",
      "check": "ERROR",
      "artifact": "8554982802"
    },
    {
      "job": 89136851306,
      "time": 180,
      "config": "source",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "8554946329"
    },
    {
      "job": 89137337066,
      "time": 120,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "8554985906"
    },
    {
      "job": 89137337096,
      "time": 108,
      "config": "windows-devel-x86_64",
      "r": "4.7.0",
      "check": "ERROR",
      "artifact": "8554982195"
    },
    {
      "job": 89137337087,
      "time": 113,
      "config": "windows-oldrel-x86_64",
      "r": "4.5.3",
      "check": "ERROR",
      "artifact": "8554983883"
    },
    {
      "job": 89137337101,
      "time": 82,
      "config": "windows-release-x86_64",
      "r": "4.6.1",
      "check": "ERROR",
      "artifact": "8554973616"
    }
  ],
  "_host": "GitHub-Actions",
  "_buildurl": "https://github.com/r-universe/aimalrehman92/actions/runs/29985664540",
  "_status": "success",
  "_upstream": "https://github.com/aimalrehman92/ragr",
  "_commit": {
    "id": "b81068fc089ed1258b9b86536f71768710ca41e3",
    "author": "aimal <rehman.aimal@gmail.com>",
    "committer": "aimal <rehman.aimal@gmail.com>",
    "message": "fixed the api handlers and ingestion\n",
    "time": 1777021650
  },
  "_maintainer": {
    "name": "Muhammad Aimal Rehman",
    "email": "rehman.aimal@gmail.com",
    "login": "aimalrehman92",
    "twitter": "@aimal_rehman",
    "description": "Data Scientist.\n",
    "uuid": 37048817
  },
  "_distro": "resolute",
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 4.1.0",
      "role": "Depends"
    },
    {
      "package": "dplyr",
      "role": "Imports"
    },
    {
      "package": "httr2",
      "role": "Imports"
    },
    {
      "package": "jsonlite",
      "role": "Imports"
    },
    {
      "package": "pdftools",
      "role": "Imports"
    },
    {
      "package": "readtext",
      "role": "Imports"
    },
    {
      "package": "tibble",
      "role": "Imports"
    },
    {
      "package": "plumber",
      "role": "Suggests"
    },
    {
      "package": "stringr",
      "role": "Suggests"
    },
    {
      "package": "yaml",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    }
  ],
  "_owner": "aimalrehman92",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2025-46",
      "n": 2
    },
    {
      "week": "2025-47",
      "n": 2
    },
    {
      "week": "2025-48",
      "n": 12
    },
    {
      "week": "2025-49",
      "n": 4
    },
    {
      "week": "2026-01",
      "n": 3
    },
    {
      "week": "2026-02",
      "n": 6
    },
    {
      "week": "2026-03",
      "n": 12
    },
    {
      "week": "2026-04",
      "n": 1
    },
    {
      "week": "2026-05",
      "n": 1
    },
    {
      "week": "2026-07",
      "n": 1
    },
    {
      "week": "2026-09",
      "n": 2
    },
    {
      "week": "2026-13",
      "n": 1
    },
    {
      "week": "2026-14",
      "n": 1
    },
    {
      "week": "2026-17",
      "n": 3
    }
  ],
  "_tags": [],
  "_stars": 2,
  "_contributors": [
    {
      "user": "aimalrehman92",
      "count": 51,
      "uuid": 37048817
    }
  ],
  "_userbio": {
    "uuid": 37048817,
    "type": "user",
    "name": "Aimal Rehman",
    "followers": 5,
    "description": "Data Scientist.\r\n"
  },
  "_downloads": {
    "count": 0,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/ragR"
  },
  "_devurl": "https://github.com/aimalrehman92/ragr",
  "_rbuild": "4.6.1",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/ragR.html",
    "extra/readme.html",
    "extra/readme.md",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/aimalrehman92/ragr",
  "_realowner": "aimalrehman92",
  "_cranurl": true,
  "_releases": [
    {
      "version": "0.1.0",
      "date": "2026-07-22"
    }
  ],
  "_exports": [
    "api_chat_handler",
    "api_clear_all_handler",
    "api_clear_handler",
    "api_ragas_clear_handler",
    "api_ragas_handler",
    "api_ragas_report_handler",
    "chunk_text_sentence",
    "clear_qa_log",
    "clear_qa_metrics",
    "compute_ragas_metrics",
    "compute_ragas_metrics_llm",
    "generate_openai_chat",
    "generate_ragas_report",
    "generate_ragas_report_llm",
    "get_openai_embeddings",
    "ingest_documents",
    "load_qa_log",
    "load_qa_metrics",
    "load_rag_config",
    "log_rag_interaction",
    "plot_ragas_means",
    "qa_log_empty",
    "qa_metrics_empty",
    "query_rag",
    "save_qa_log",
    "save_qa_metrics",
    "summarize_ragas",
    "vectorstore_clear_all",
    "vectorstore_delete_collection",
    "vectorstore_load",
    "vectorstore_query",
    "vectorstore_upsert"
  ],
  "_help": [
    {
      "page": "ragR-package",
      "title": "ragR: Retrieval-Augmented Generation + RAGAS Evaluation in R",
      "topics": [
        "ragR-package",
        "ragR"
      ]
    },
    {
      "page": "api_chat_handler",
      "title": "API handler: chat with the RAG pipeline",
      "topics": [
        "api_chat_handler"
      ]
    },
    {
      "page": "api_clear_all_handler",
      "title": "API handler: clear the entire vector store",
      "topics": [
        "api_clear_all_handler"
      ]
    },
    {
      "page": "api_clear_handler",
      "title": "API handler: clear one vector-store collection",
      "topics": [
        "api_clear_handler"
      ]
    },
    {
      "page": "api_ragas_clear_handler",
      "title": "API handler: clear RAGAS/QA evaluation files",
      "topics": [
        "api_ragas_clear_handler"
      ]
    },
    {
      "page": "api_ragas_handler",
      "title": "API handler: compute RAGAS metrics and summary from saved QA log",
      "topics": [
        "api_ragas_handler"
      ]
    },
    {
      "page": "api_ragas_report_handler",
      "title": "API handler: generate RAGAS performance report",
      "topics": [
        "api_ragas_report_handler"
      ]
    },
    {
      "page": "chunk_text_sentence",
      "title": "Chunk text into sentences (strict)",
      "topics": [
        "chunk_text_sentence"
      ]
    },
    {
      "page": "clear_qa_log",
      "title": "Clear the QA log on disk",
      "topics": [
        "clear_qa_log"
      ]
    },
    {
      "page": "clear_qa_metrics",
      "title": "Clear QA metrics on disk",
      "topics": [
        "clear_qa_metrics"
      ]
    },
    {
      "page": "compute_ragas_metrics",
      "title": "Compute RAGAS metrics",
      "topics": [
        "compute_ragas_metrics"
      ]
    },
    {
      "page": "compute_ragas_metrics_llm",
      "title": "Compute RAGAS-style metrics (LLM scored)",
      "topics": [
        "compute_ragas_metrics_llm"
      ]
    },
    {
      "page": "generate_openai_chat",
      "title": "Generate a chat completion from OpenAI",
      "topics": [
        "generate_openai_chat"
      ]
    },
    {
      "page": "generate_ragas_report",
      "title": "Generate a RAGAS performance report",
      "topics": [
        "generate_ragas_report"
      ]
    },
    {
      "page": "generate_ragas_report_llm",
      "title": "Generate RAGAS report using LLM scoring",
      "topics": [
        "generate_ragas_report_llm"
      ]
    },
    {
      "page": "get_openai_embeddings",
      "title": "Get embeddings from OpenAI",
      "topics": [
        "get_openai_embeddings"
      ]
    },
    {
      "page": "ingest_documents",
      "title": "Ingest documents into the vector store",
      "topics": [
        "ingest_documents"
      ]
    },
    {
      "page": "load_qa_log",
      "title": "Load a QA log from disk",
      "topics": [
        "load_qa_log"
      ]
    },
    {
      "page": "load_qa_metrics",
      "title": "Load QA metrics from disk",
      "topics": [
        "load_qa_metrics"
      ]
    },
    {
      "page": "load_rag_config",
      "title": "Load RAG configuration",
      "topics": [
        "load_rag_config"
      ]
    },
    {
      "page": "log_rag_interaction",
      "title": "Append one RAG interaction to the QA log",
      "topics": [
        "log_rag_interaction"
      ]
    },
    {
      "page": "plot_ragas_means",
      "title": "Plot mean RAGAS metrics to a PNG",
      "topics": [
        "plot_ragas_means"
      ]
    },
    {
      "page": "qa_log_empty",
      "title": "Create an empty QA log tibble",
      "topics": [
        "qa_log_empty"
      ]
    },
    {
      "page": "qa_metrics_empty",
      "title": "Create an empty QA metrics tibble",
      "topics": [
        "qa_metrics_empty"
      ]
    },
    {
      "page": "query_rag",
      "title": "Query the RAG pipeline",
      "topics": [
        "query_rag"
      ]
    },
    {
      "page": "save_qa_log",
      "title": "Save a QA log to disk",
      "topics": [
        "save_qa_log"
      ]
    },
    {
      "page": "save_qa_metrics",
      "title": "Save QA metrics to disk",
      "topics": [
        "save_qa_metrics"
      ]
    },
    {
      "page": "summarize_ragas",
      "title": "Summarize RAGAS metrics across QA pairs",
      "topics": [
        "summarize_ragas"
      ]
    },
    {
      "page": "vectorstore_clear_all",
      "title": "Delete ALL collections from the vector store",
      "topics": [
        "vectorstore_clear_all"
      ]
    },
    {
      "page": "vectorstore_delete_collection",
      "title": "Delete a collection from the R-native vector store",
      "topics": [
        "vectorstore_delete_collection"
      ]
    },
    {
      "page": "vectorstore_load",
      "title": "Load the R-native vector store",
      "topics": [
        "vectorstore_load"
      ]
    },
    {
      "page": "vectorstore_query",
      "title": "Query the R-native vector store for nearest neighbors",
      "topics": [
        "vectorstore_query"
      ]
    },
    {
      "page": "vectorstore_upsert",
      "title": "Upsert embeddings into the R-native vector store",
      "topics": [
        "vectorstore_upsert"
      ]
    }
  ],
  "_readme": "https://github.com/aimalrehman92/ragr/raw/HEAD/README.md",
  "_rundeps": [
    "antiword",
    "askpass",
    "bitops",
    "cellranger",
    "cli",
    "cpp11",
    "crayon",
    "curl",
    "data.table",
    "digest",
    "dplyr",
    "generics",
    "glue",
    "hms",
    "httr",
    "httr2",
    "jsonlite",
    "lifecycle",
    "magrittr",
    "mime",
    "minty",
    "ndjson",
    "openssl",
    "pdftools",
    "pillar",
    "pkgconfig",
    "prettyunits",
    "progress",
    "qpdf",
    "R6",
    "Rcpp",
    "RCurl",
    "readODS",
    "readtext",
    "readxl",
    "rematch",
    "rjson",
    "rlang",
    "streamR",
    "stringi",
    "stringr",
    "striprtf",
    "sys",
    "tibble",
    "tidyselect",
    "tzdb",
    "utf8",
    "vctrs",
    "withr",
    "xml2",
    "zip"
  ],
  "_score": 4.146128035678238,
  "_indexed": true,
  "_nocasepkg": "ragr",
  "_universes": [
    "aimalrehman92"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.0.0.9000",
      "date": "2026-07-23T06:43:32.000Z",
      "distro": "resolute",
      "commit": "b81068fc089ed1258b9b86536f71768710ca41e3",
      "fileid": "https://r2.ropensci.org/7aa767e2f233b3351a6e458c6d33fd59126cbec7f40a4c1e9b340f997ad817d9",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/aimalrehman92/actions/runs/29985664540"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "0.0.0.9000",
      "date": "2026-07-23T06:43:36.000Z",
      "distro": "resolute",
      "commit": "b81068fc089ed1258b9b86536f71768710ca41e3",
      "fileid": "https://r2.ropensci.org/87ef3f15805fecb8a498ccf39b13a1809ce6b3384b75374b9162b32b3c1dad70",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/aimalrehman92/actions/runs/29985664540"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.0.0.9000",
      "date": "2026-07-23T06:43:40.000Z",
      "commit": "b81068fc089ed1258b9b86536f71768710ca41e3",
      "fileid": "https://r2.ropensci.org/6fc5035530d79e7f86232d2acdbd91bd4f6d344cd52445ff8aab7a44aebacbd0",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/aimalrehman92/actions/runs/29985664540"
    },
    {
      "r": "4.6.1",
      "os": "mac",
      "version": "0.0.0.9000",
      "date": "2026-07-23T06:43:14.000Z",
      "commit": "b81068fc089ed1258b9b86536f71768710ca41e3",
      "fileid": "https://r2.ropensci.org/f2d34f50751393c9b36edfaed39048a5ccea91c48517959bd833d47b24a718e5",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/aimalrehman92/actions/runs/29985664540"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.0.0.9000",
      "date": "2026-07-23T06:43:35.000Z",
      "commit": "b81068fc089ed1258b9b86536f71768710ca41e3",
      "fileid": "https://r2.ropensci.org/411a2ec8c780bc61f0c7ef1d88db5ee304621b9eeed82ef19865c934129cc61d",
      "status": "success",
      "buildurl": "https://github.com/r-universe/aimalrehman92/actions/runs/29985664540"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.0.0.9000",
      "date": "2026-07-23T06:43:05.000Z",
      "commit": "b81068fc089ed1258b9b86536f71768710ca41e3",
      "fileid": "https://r2.ropensci.org/46e60fda27c3dcae578ca41a4aff806602d2eabbc54ea0286e64b43df3d68687",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/aimalrehman92/actions/runs/29985664540"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.0.0.9000",
      "date": "2026-07-23T06:43:11.000Z",
      "commit": "b81068fc089ed1258b9b86536f71768710ca41e3",
      "fileid": "https://r2.ropensci.org/e831386b6efad09ba7d2eb44c5b35ea23f52f675382b87eec53a9f5144af3e06",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/aimalrehman92/actions/runs/29985664540"
    },
    {
      "r": "4.6.1",
      "os": "win",
      "version": "0.0.0.9000",
      "date": "2026-07-23T06:42:39.000Z",
      "commit": "b81068fc089ed1258b9b86536f71768710ca41e3",
      "fileid": "https://r2.ropensci.org/d0453a53ec25c99ef02224f641c9df6d5fe0727ec6ee02707bb200c1a819ed5f",
      "status": "failure",
      "check": "ERROR",
      "buildurl": "https://github.com/r-universe/aimalrehman92/actions/runs/29985664540"
    }
  ]
}