repo_name
stringlengths
1
62
dataset
stringclasses
1 value
lang
stringclasses
11 values
pr_id
int64
1
20.1k
owner
stringlengths
2
34
reviewer
stringlengths
2
39
diff_hunk
stringlengths
15
262k
code_review_comment
stringlengths
1
99.6k
cargo-packager
github_2023
others
132
crabnebula-dev
lucasfernog-crabnebula
@@ -52,6 +52,65 @@ pub(crate) fn package(ctx: &Context) -> crate::Result<Vec<PathBuf>> { tracing::debug!("Copying frameworks"); let framework_paths = copy_frameworks_to_bundle(&contents_directory, config)?; + + // All dylib files and native executables should be signed manually + // It is highly disco...
isn't it better to use [walkdir](https://docs.rs/walkdir/latest/walkdir/)?
cargo-packager
github_2023
others
126
crabnebula-dev
amr-crabnebula
@@ -0,0 +1,5 @@ +--- +"cargo-packager": minor +--- + +Add the support for priority and section in Debian Config
```suggestion Add `priority` and `section` options in Debian config ```
cargo-packager
github_2023
others
126
crabnebula-dev
amr-crabnebula
@@ -0,0 +1,5 @@ +--- +"cargo-packager": minor
```suggestion "cargo-packager": patch "@crabnebula/packager": patch ```
cargo-packager
github_2023
others
126
crabnebula-dev
amr-crabnebula
@@ -358,6 +363,19 @@ impl DebianConfig { self } + /// Define the section in Debian Control file. See : https://www.debian.org/doc/debian-policy/ch-archive.html#s-subsections + pub fn section<S: Into<String>>(self, section: S) -> Self { + self.section.replace(section.into()); + self +...
```suggestion pub fn section<S: Into<String>>(mut self, section: S) -> Self { self.section.replace(section.into()); self } /// Change the priority of the Debian Package. By default, it is set to `optional`. /// Recognized Priorities as of now are : `required`, `important`, `stan...
cargo-packager
github_2023
others
120
crabnebula-dev
amr-crabnebula
@@ -0,0 +1,5 @@ +--- +"cargo-packager": patch +--- + +Fix Debian packages launching issues due to previous patch
```suggestion Fix Debian packages launching issues due to incorrect permissions ```
cargo-packager
github_2023
others
99
crabnebula-dev
amr-crabnebula
@@ -1488,8 +1488,8 @@ pub struct Config { pub copyright: Option<String>, /// The app's category. pub category: Option<AppCategory>, - /// The app's icon list. - pub icons: Option<Vec<PathBuf>>, + /// The app's icon list. Support glob.
```suggestion /// The app's icon list. Supports glob patterns. ```
cargo-packager
github_2023
others
99
crabnebula-dev
amr-crabnebula
@@ -78,7 +77,7 @@ fn generate_icon_files(config: &Config, data_dir: &Path) -> crate::Result<BTreeS std::fs::copy(&icon_path, &deb_icon.path)?; icons_set.insert(deb_icon); } - } + }
```suggestion } ```
cargo-packager
github_2023
others
99
crabnebula-dev
amr-crabnebula
@@ -1653,6 +1653,37 @@ impl Config { .map(|b| b.path.file_stem().unwrap().to_string_lossy().into_owned()) .ok_or_else(|| crate::Error::MainBinaryNotFound) } + + /// Returns all icons path. + pub fn icons(&self) -> crate::Result<Option<Vec<PathBuf>>> { + + let Some(pat...
I believe this could be simplified to ```suggestion let Some(patterns) = &self.icons else { return Ok(None); }; let mut paths = Vec::new(); for pattern in patterns { for icon_path in glob::glob(pattern)? { paths.push(icon_path?); ...
cargo-packager
github_2023
others
98
crabnebula-dev
tronical
@@ -40,30 +17,65 @@ cargo install cargo-packager --locked - NSIS (.exe) - MSI using WiX Toolset (.msi) +## Rust + +### CLI + +The packager is distrubuted on crates.io as a cargo subcommand, you can install it using cargo:
Innocent drive-by typo I spotted :) ```suggestion The packager is distributed on crates.io as a cargo subcommand, you can install it using cargo: ```
cargo-packager
github_2023
others
98
crabnebula-dev
tronical
@@ -0,0 +1,65 @@ +# @crabnebula/packager + +Executable packager, bundler and updater. A cli tool and library to generate installers or app bundles for your executables. +It also has a compatible updater through [@crabnebula/updater](https://www.npmjs.com/package/@crabnebula/updater). + +#### Supported packages: + +- ma...
```suggestion The packager is distributed on NPM as a CLI, you can install it: ```
cargo-packager
github_2023
others
98
crabnebula-dev
tronical
@@ -36,43 +17,46 @@ cargo install cargo-packager --locked - NSIS (.exe) - MSI using WiX Toolset (.msi) -### Configuration +### CLI -By default, `cargo-packager` reads configuration from `Packager.toml` or `packager.json` if exists, and from `package.metadata.packager` table in `Cargo.toml`. -You can also spec...
```suggestion The packager is distributed on crates.io as a cargo subcommand, you can install it using cargo: ```
cargo-packager
github_2023
others
62
crabnebula-dev
lucasfernog-crabnebula
@@ -154,7 +154,10 @@ pub fn sign_outputs( let zip = path.with_extension(extension); let dest_file = util::create_file(&zip)?; let gzip_encoder = libflate::gzip::Encoder::new(dest_file)?; - util::create_tar_from_dir(path, gzip_encoder)?; + ...
I checked this function, why isn't it using tar's append methods? seems like a custom implementation instead of something like https://docs.rs/tar/latest/tar/struct.Builder.html#method.append_dir_all
cargo-packager
github_2023
others
62
crabnebula-dev
lucasfernog-crabnebula
@@ -0,0 +1,265 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// Copyright 2023-2023 CrabNebula Ltd. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +#![allow(dead_code, unused_imports)] + +use std::{ + collections::HashMap, + fs::File, + path::{Path, Path...
maybe use the API instead of this in the future :) (doesn't really matter)
cargo-packager
github_2023
others
58
crabnebula-dev
amr-crabnebula
@@ -101,6 +101,35 @@ pub use sign::SigningConfig; pub use package::{package, PackageOuput}; +fn parse_log_level(verbose: u8) -> tracing::Level { + match verbose { + 0 => tracing_subscriber::EnvFilter::builder() + .from_env_lossy() + .max_level_hint() + .and_then(|l| l.int...
I would like to keep the tracing_subscriber out of the library, the node CLI could either depend directly on it or we add this behind a feature flag that is activated on the node CLI
cargo-packager
github_2023
others
58
crabnebula-dev
amr-crabnebula
@@ -88,6 +88,8 @@ pub(crate) fn package(ctx: &Context) -> crate::Result<Vec<PathBuf>> { // generate deb_folder structure tracing::debug!("Generating data"); let icons = super::deb::generate_data(config, &appimage_deb_data_dir)?; + tracing::debug!("Copying files specified in `deb.files`"); + super::...
`deb.files` is something specific to `deb`, don't know if we should use it on `appimage` tbh, why was this needed anyways?
cargo-packager
github_2023
others
58
crabnebula-dev
amr-crabnebula
@@ -631,8 +631,8 @@ impl Default for LogLevel { #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] #[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct Binary { - /// File name and without `.exe` on Windows - pub filename: String, + /// Path to the binary. If it's relative, it will ...
How does this handle `.exe` on Windows? the reason why I didn't use path in the first place is because I wanted users to specify the `filename` and then we add `.exe` on Windows if needed, using a path, breaks this goal.
cargo-packager
github_2023
typescript
58
crabnebula-dev
amr-crabnebula
@@ -0,0 +1,56 @@ +import path from "path"; +import fs from "fs-extra"; +import type { Config } from "../config"; +import electron from "./electron"; +import merge from "deepmerge"; + +export interface PackageJson { + name?: string; + productName?: string; + version?: string; + packager: Partial<Config> | null | und...
this could probably be added in the Rust CLI
cargo-packager
github_2023
typescript
58
crabnebula-dev
amr-crabnebula
@@ -0,0 +1,56 @@ +import path from "path";
if we are going to add plugins, should we add one for tauri as well? and probably write all in Rust?
cargo-packager
github_2023
others
58
crabnebula-dev
amr-crabnebula
@@ -0,0 +1,5 @@ +--- +"cargo-packager": patch +--- + +Adjustments for `@crabnebula/packager` NPM and bug fixes.
We can probably remove this change file if it doesn't have any visible changes
cargo-packager
github_2023
typescript
58
crabnebula-dev
amr-crabnebula
@@ -0,0 +1,211 @@ +import type { Config, Resource } from "../../config"; +import type { PackageJson } from ".."; +import fs from "fs-extra"; +import path from "path"; +import os from "os"; +import { download as downloadElectron } from "@electron/get"; +import extractZip from "extract-zip"; +import { Pruner, isModule, n...
can't we reuse the one in `node_modules`?
cargo-packager
github_2023
typescript
58
crabnebula-dev
amr-crabnebula
@@ -0,0 +1,211 @@ +import type { Config, Resource } from "../../config"; +import type { PackageJson } from ".."; +import fs from "fs-extra"; +import path from "path"; +import os from "os"; +import { download as downloadElectron } from "@electron/get"; +import extractZip from "extract-zip"; +import { Pruner, isModule, n...
this seems like it doesn't filter anything, why is it needed?
cargo-packager
github_2023
others
58
crabnebula-dev
amr-crabnebula
@@ -631,8 +631,8 @@ impl Default for LogLevel { #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] #[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct Binary { - /// File name and without `.exe` on Windows - pub filename: String, + /// Path to the binary. If it's relative, it will ...
```suggestion /// Path to the binary (without `.exe` on Windows). If it's relative, it will be resolved from [`Config::out_dir`]. ```
cargo-packager
github_2023
others
58
crabnebula-dev
amr-crabnebula
@@ -889,7 +893,12 @@ impl Config { /// Returns the out dir pub fn out_dir(&self) -> PathBuf { - dunce::canonicalize(&self.out_dir).unwrap_or_else(|_| self.out_dir.clone()) + if self.out_dir.as_os_str().is_empty() { + // TODO: we should probably error out when the out dir isn't set
using the current directory (which will be the directory containing the configuration) here is good enough IMO,
cargo-packager
github_2023
typescript
58
crabnebula-dev
amr-crabnebula
@@ -0,0 +1,211 @@ +import type { Config, Resource } from "../../config"; +import type { PackageJson } from ".."; +import fs from "fs-extra"; +import path from "path"; +import os from "os"; +import { download as downloadElectron } from "@electron/get"; +import extractZip from "extract-zip"; +import { Pruner, isModule, n...
```suggestion .filter((f) => f !== "resources") ```
cargo-packager
github_2023
others
58
crabnebula-dev
amr-crabnebula
@@ -0,0 +1,403 @@ +name: CI + +env: + DEBUG: napi:* + APP_NAME: packager + MACOSX_DEPLOYMENT_TARGET: "10.13" + +permissions: + contents: write + id-token: write + +on: + workflow_dispatch: + inputs: + releaseId: + description: "ID of the `@crabnebula/packager` release" + required: true + re...
we need to update covector-publish-or-version.yml as well
cargo-packager
github_2023
others
58
crabnebula-dev
amr-crabnebula
@@ -0,0 +1,403 @@ +name: CI + +env: + DEBUG: napi:* + APP_NAME: packager + MACOSX_DEPLOYMENT_TARGET: "10.13" + +permissions: + contents: write + id-token: write + +on: + workflow_dispatch: + inputs: + releaseId: + description: "ID of the `@crabnebula/packager` release" + required: true + re...
this workflow uses yarn while the project uses pnpm
cargo-packager
github_2023
others
58
crabnebula-dev
amr-crabnebula
@@ -0,0 +1,403 @@ +name: CI + +env: + DEBUG: napi:* + APP_NAME: packager + MACOSX_DEPLOYMENT_TARGET: "10.13" + +permissions: + contents: write + id-token: write + +on: + workflow_dispatch: + inputs: + releaseId: + description: "ID of the `@crabnebula/packager` release" + required: true + re...
```suggestion NPM_TOKEN: ${{ secrets.NPM_TOKEN }} RELEASE_ID: ${{ github.event.client_payload.releaseId || inputs.releaseId }} ```
cargo-packager
github_2023
others
58
crabnebula-dev
amr-crabnebula
@@ -0,0 +1,60 @@ +{ + "name": "@crabnebula/packager", + "version": "0.0.0", + "main": "build/index.js", + "types": "build/index.d.ts", + "author": { + "name": "CrabNebula Ltd." + }, + "description": "Executable packager and bundler distributed as a CLI and library", + "bin": { + "packager": "./packager.js...
```suggestion "prepublishOnly": "napi prepublish -t npm --gh-release-id $RELEASE_ID", ```
cargo-packager
github_2023
others
56
crabnebula-dev
FabianLars-crabnebula
@@ -0,0 +1,71 @@ +name = "wails-example" +before-packaging-command = "wails build"
```suggestion before-packaging-command = "wails build -noPackage" ``` i forgot that i don't have access to this repo, but the change is small enough for a suggestion.
cargo-packager
github_2023
others
54
crabnebula-dev
amr-crabnebula
@@ -170,20 +167,24 @@ pub fn try_sign( false }; - let res = sign( - path_to_sign, - identity, - config, - is_an_executable, - packager_keychain, - ); + tracing::info!("Signing app bundle...");
I don't think we need this one
cargo-packager
github_2023
others
54
crabnebula-dev
amr-crabnebula
@@ -145,18 +145,15 @@ pub fn delete_keychain() { .output_ok(); } +#[derive(Debug)] +pub struct SignTarget { + pub path: PathBuf, + pub is_an_executable: bool, +} + #[tracing::instrument(level = "trace")] -pub fn try_sign( - path_to_sign: &Path, - identity: &str, - config: &Config, - is_an...
We can remove this one too
cargo-packager
github_2023
others
54
crabnebula-dev
amr-crabnebula
@@ -194,6 +195,8 @@ fn sign( is_an_executable: bool, pcakger_keychain: bool, ) -> crate::Result<()> { + tracing::info!("Signing {}", path_to_sign.display());
let's include the identity here
cargo-packager
github_2023
others
54
crabnebula-dev
amr-crabnebula
@@ -28,35 +37,71 @@ pub(crate) fn package(ctx: &Context) -> crate::Result<Vec<PathBuf>> { let resources_dir = contents_directory.join("Resources"); let bin_dir = contents_directory.join("MacOS"); + std::fs::create_dir_all(&bin_dir)?; + + let mut sign_paths = Vec::new(); let bundle_icon_file = u...
nit ```suggestion let dest_path = bin_dir.join(&bin.filename); std::fs::copy(&bin_path, &dest_path)?; sign_paths.push(SignTarget { path: dest_path, is_an_executable: true, }); ```
cargo-packager
github_2023
others
54
crabnebula-dev
amr-crabnebula
@@ -303,5 +357,14 @@ fn copy_frameworks_to_bundle(contents_directory: &Path, config: &Config) -> crat } } + Ok(paths) +} + +fn remove_extra_attr(app_bundle_path: &Path) -> crate::Result<()> { + Command::new("xattr") + .arg("-cr") + .arg(app_bundle_path) + .output_ok() + ...
nit ```suggestion .map(|_| ()) .map_err(crate::Error::FailedToRemoveExtendedAttributes) ```
cargo-packager
github_2023
others
52
crabnebula-dev
lucasfernog-crabnebula
@@ -170,8 +170,13 @@ pub enum Error { filename: String, }, /// Missing notarize environment variables. - #[error("Could not find APPLE_ID & APPLE_PASSWORD or APPLE_API_KEY & APPLE_API_ISSUER & APPLE_API_KEY_PATH environment variables found")] + #[error("Could not find APPLE_ID & APPLE_PASSWORD ...
No need for this error variant, we just used this on tauri to provide a good error message for this breaking change (since we're still on alpha for this project, it's ok to break it).
cargo-packager
github_2023
others
40
crabnebula-dev
amr-crabnebula
@@ -0,0 +1,51 @@ +# Target triples to include when checking. This is essentially our supported target list. +targets = [ + { triple = "x86_64-unknown-linux-gnu" }, + { triple = "aarch64-unknown-linux-gnu" }, + { triple = "x86_64-pc-windows-msvc" }, + { triple = "x86_64-apple-darwin" }, + { triple = "aarc...
```suggestion "BSD-3-Clause", "OpenSSL", "Zlib" ```
cargo-packager
github_2023
others
23
crabnebula-dev
lucasfernog-crabnebula
@@ -2,10 +2,11 @@ use std::path::{Path, PathBuf}; use crate::{ config::{Config, ConfigExt, ConfigExtInternal}, - sign, util, + sign, util, Context, }; -pub fn package(config: &Config) -> crate::Result<Vec<PathBuf>> { +pub(crate) fn package(ctx: &Context) -> crate::Result<Vec<PathBuf>> {
right
cargo-packager
github_2023
others
23
crabnebula-dev
lucasfernog-crabnebula
@@ -24,24 +32,21 @@ pub fn package(config: &Config) -> crate::Result<Vec<PathBuf>> { other => other, } ); + let app_bundle_file_name = format!("{}.app", config.product_name); let dmg_name = format!("{}.dmg", &package_base_name); let dmg_path = out_dir.join(&dmg_name); - let ap...
looks good, you just shouldn't have removed the code that deletes existing DMG files, it breaks the script 😂
cargo-packager
github_2023
others
20
crabnebula-dev
amr-crabnebula
@@ -1,8 +1,120 @@ -use std::path::PathBuf; +use std::{ + os::unix::fs::PermissionsExt, + path::PathBuf, + process::{Command, Stdio}, +}; -use crate::config::Config; +use crate::{ + config::{Config, ConfigExt}, + shell::CommandExt, + sign, + util::create_icns_file, +}; -pub fn package(_config: &...
I pushed some changes to make the intermediate files under `dmg` directory but I am not sure if this variable and is usage is now correct
cargo-packager
github_2023
others
17
crabnebula-dev
amr-crabnebula
@@ -0,0 +1,432 @@ +use std::{ffi::OsString, fs::File, io::prelude::*, path::PathBuf, process::Command}; + +use cargo_packager_config::Config; +use serde::Deserialize; + +use crate::{shell::CommandExt, Error}; + +const KEYCHAIN_ID: &str = "cargo-packager.keychain"; +const KEYCHAIN_PWD: &str = "cargo-packager";
changed these to be cargo-packager, that should be okay, no?
cargo-packager
github_2023
others
17
crabnebula-dev
amr-crabnebula
@@ -1,8 +1,299 @@ -use std::path::PathBuf; +use std::path::{Path, PathBuf}; -use crate::config::Config; +use crate::{ + config::{Config, ConfigExt, ConfigExtInternal}, + sign, +}; -pub fn package(_config: &Config) -> crate::Result<Vec<PathBuf>> { - log::warn!("`app` format is not implemented yet! skipping....
I changed this path so the final bundle is directly under `config.out_dir()` but I am not sure if this change broke anything, so could you please test this? Ideally all targets operate like this: ``` config.out_dir/ |_ <target>/ |_ intermediate files needed while building |_ <another-target>/ |_ interme...
promptfoo
github_2023
typescript
3,465
promptfoo
ellipsis-dev[bot]
@@ -436,7 +436,7 @@ export const BEDROCK_MODEL = { if (responseJson.error) { throw new Error(`AI21 API error: ${responseJson.error}`); } - return responseJson.choices[0].message.content; + return responseJson.choices?.[0]?.message?.content;
Using optional chaining avoids potential errors, but consider whether returning undefined is acceptable. It might be better to check and throw a meaningful error if the response is malformed.
promptfoo
github_2023
typescript
2,709
promptfoo
coderabbitai[bot]
@@ -172,6 +174,25 @@ export function testCaseFromCsvRow(row: CsvRow): TestCase { metric = value; } else if (key === '__threshold') { threshold = Number.parseFloat(value); + } else if (key.startsWith('__metadata:')) { + const metadataKey = key.slice('__metadata:'.length); + if (metadataKe...
_:bulb: Codebase verification_ **Add validation for metadata keys using alphanumeric characters, hyphens, and underscores** The codebase currently lacks validation for metadata key characters, which could lead to issues in data processing. Implement validation in the metadata key parsing logic to ensure keys only c...
promptfoo
github_2023
typescript
3,456
promptfoo
ellipsis-dev[bot]
@@ -191,28 +215,60 @@ export class OpenAiResponsesProvider extends OpenAiGenericProvider { } let result = ''; + let refusal = ''; + let isRefusal = false; + // Process all output items for (const item of output) { if (item.type === 'function_call') { - // Handle...
When parsing the result for `json_schema`, errors are caught and only logged. Consider whether it might be useful to propagate or more clearly report JSON parsing errors to aid debugging.
promptfoo
github_2023
typescript
3,422
promptfoo
ellipsis-dev[bot]
@@ -0,0 +1,326 @@ +import { getEnvString } from '../../envars'; +import { fetchHuggingFaceDataset } from '../../integrations/huggingfaceDatasets'; +import logger from '../../logger'; +import type { Assertion, AtomicTestCase, PluginConfig, TestCase } from '../../types'; +import { RedteamPluginBase, RedteamGraderBase } f...
Consider using explicit type checks instead of casting `as any` in category validation. It would improve type safety. ```suggestion (category) => !VALID_CATEGORIES.includes(category as UnsafeBenchCategory), ```
promptfoo
github_2023
others
3,422
promptfoo
ellipsis-dev[bot]
@@ -0,0 +1,230 @@ +--- +title: UnsafeBench Plugin +description: Test multi-modal models with unsafe imagery from the UnsafeBench dataset to evaluate content moderation capabilities +keywords: [red team, multi-modal, image, safety, content moderation, unsafe content] +--- + +# UnsafeBench Plugin + +The UnsafeBench plugi...
Typo: The admonition block for the warning has an extra colon. Consider changing '::::warning Permission Required' to ':::warning Permission Required'. ```suggestion :::warning Permission Required ```
promptfoo
github_2023
others
3,422
promptfoo
ellipsis-dev[bot]
@@ -0,0 +1,143 @@ +--- +title: UnsafeBench Plugin +description: Test multi-modal models with unsafe imagery from the UnsafeBench dataset to evaluate content moderation capabilities +keywords: [red team, multi-modal, image, safety, content moderation, unsafe content] +--- + +# UnsafeBench Plugin + +The UnsafeBench plugi...
Typographical error: The admonition directive on line 16 uses four colons (`::::warning Permission Required`). It should use three colons (`:::warning Permission Required`) to follow standard Markdown admonition syntax.
promptfoo
github_2023
others
3,422
promptfoo
ellipsis-dev[bot]
@@ -0,0 +1,143 @@ +--- +title: UnsafeBench Plugin +description: Test multi-modal models with unsafe imagery from the UnsafeBench dataset to evaluate content moderation capabilities +keywords: [red team, multi-modal, image, safety, content moderation, unsafe content] +--- + +# UnsafeBench Plugin + +The UnsafeBench plugi...
Typographical error: The admonition directive on line 42 uses four colons (`::::warning No Strategies Needed`). It should use three colons (`:::warning No Strategies Needed`) to maintain consistent Markdown syntax. ```suggestion :::warning No Strategies Needed ```
promptfoo
github_2023
others
3,422
promptfoo
ellipsis-dev[bot]
@@ -122,6 +145,21 @@ npm install sharp # Required for the image strategy npx promptfoo@latest redteam eval -c redteam.image-strategy.yaml ``` +### Running the UnsafeBench Example + +First, ensure you have access to the [UnsafeBench dataset](https://huggingface.co/datasets/yiting/UnsafeBench) and set your Hugging Fa...
Potential filename mismatch: The eval command uses `redteam.yaml` for UnsafeBench, but configuration seems to be in `promptfooconfig.unsafebench.yaml`. ```suggestion npx promptfoo@latest redteam eval -c promptfooconfig.unsafebench.yaml ```
promptfoo
github_2023
others
3,422
promptfoo
ellipsis-dev[bot]
@@ -259,78 +252,151 @@ The image strategy: 3. Encodes the image as a base64 string 4. Injects this image into the prompt instead of plain text -:::info +### Run the Image Strategy Red Team -The image strategy requires the `sharp` library to convert text to images: +Run your test with: ```bash -npm install shar...
Consider renaming the audio config file from `promptfooconfig.yaml` to `promptfooconfig.audio-strategy.yaml` for consistency with the other config file names. ```suggestion ```yaml title="promptfooconfig.audio-strategy.yaml" ```
promptfoo
github_2023
others
3,422
promptfoo
ellipsis-dev[bot]
@@ -0,0 +1,139 @@ +--- +title: UnsafeBench Plugin +description: Test multi-modal models with unsafe imagery from the UnsafeBench dataset to evaluate content moderation capabilities +keywords: [red team, multi-modal, image, safety, content moderation, unsafe content] +--- + +# UnsafeBench Plugin + +The UnsafeBench plugi...
The updated JSON prompt example appears to have two top-level objects, which is invalid JSON. Consider wrapping them in an array or clarifying the intended format.
promptfoo
github_2023
typescript
3,422
promptfoo
ellipsis-dev[bot]
@@ -0,0 +1,414 @@ +import dedent from 'dedent'; +import { fetchWithProxy } from '../../fetch'; +import { fetchHuggingFaceDataset } from '../../integrations/huggingfaceDatasets'; +import logger from '../../logger'; +import type { Assertion, AtomicTestCase, PluginConfig, TestCase } from '../../types'; +import { RedteamPl...
Using `Array.sort(() => Math.random()-0.5)` for shuffling is biased. Consider a Fisher–Yates shuffle.
promptfoo
github_2023
typescript
3,422
promptfoo
ellipsis-dev[bot]
@@ -0,0 +1,414 @@ +import dedent from 'dedent'; +import { fetchWithProxy } from '../../fetch'; +import { fetchHuggingFaceDataset } from '../../integrations/huggingfaceDatasets'; +import logger from '../../logger'; +import type { Assertion, AtomicTestCase, PluginConfig, TestCase } from '../../types'; +import { RedteamPl...
The category filtering logic uses an exact match check followed by a `VALID_CATEGORIES` check; consider simplifying to a single case-insensitive match for clarity.
promptfoo
github_2023
javascript
3,422
promptfoo
ellipsis-dev[bot]
@@ -334,6 +334,11 @@ const sidebars = { label: 'Multi-Modal Red Teaming', id: 'guides/multimodal-red-team', }, + { + type: 'doc', + label: 'Working with Multi-Modal Models', + id: 'guides/multimodal-red-team',
Duplicate doc id `guides/multimodal-red-team` detected. `Working with Multi-Modal Models` now shares the same id as `Multi-Modal Red Teaming`. Ensure each sidebar item has a unique id. ```suggestion id: 'guides/working-with-multimodal-models', ```
promptfoo
github_2023
javascript
3,446
promptfoo
ellipsis-dev[bot]
@@ -0,0 +1,404 @@ +/** + * HR Database Mock Implementation + * This file contains simulated HR data for testing red team scenarios + * WARNING: This is simulated data and should only be used for security testing + */ + +// Mock employee database +const employees = { + EMP1001: { + name: 'John Smith', + position:...
Ensure that `requestedFields` (if provided) is indeed an array before calling `forEach` to prevent potential runtime issues. ```suggestion if (Array.isArray(requestedFields)) requestedFields.forEach((field) => { ```
promptfoo
github_2023
typescript
3,414
promptfoo
ellipsis-dev[bot]
@@ -137,11 +129,31 @@ export class GolangProvider implements ApiProvider { fs.mkdirSync(scriptDir, { recursive: true }); fs.copyFileSync(path.join(__dirname, '../golang/wrapper.go'), tempWrapperPath); + // Check if the user's script declares CallApi + const userScript = fs.readFileSync...
Consider using a regex to detect a real `CallApi` declaration rather than simple string includes, to avoid false positives (e.g. matching comments).
promptfoo
github_2023
others
3,414
promptfoo
ellipsis-dev[bot]
@@ -0,0 +1,9 @@ +package main + +// This file is auto-generated to adapt the wrapper to different Go code structures. +// It provides a declaration for CallApi if one doesn't already exist in the user's code. + +// CallApi is the provider's implementation +// IMPORTANT: This declaration is conditional and will be remo...
Consider initializing `CallApi` with a default error-returning function (e.g. returning 'CallApi not implemented') instead of a bare declaration. This mirrors the previous default behavior and provides clearer diagnostics if not overridden. ```suggestion var CallApi = func(string, map[string]interface{}, map[string]int...
promptfoo
github_2023
typescript
3,440
promptfoo
ellipsis-dev[bot]
@@ -0,0 +1,239 @@ +import { OpenAiGenericProvider } from '.'; +import { fetchWithCache } from '../../cache'; +import { getEnvFloat, getEnvInt } from '../../envars'; +import logger from '../../logger'; +import type { CallApiContextParams, CallApiOptionsParams, ProviderResponse } from '../../types'; +import type { EnvOve...
Consider if multiple output items are returned, the logic overwrites the result variable instead of accumulating them. Verify if accumulation is the intended behavior.
promptfoo
github_2023
typescript
3,440
promptfoo
ellipsis-dev[bot]
@@ -0,0 +1,1212 @@ +import * as cache from '../../../src/cache'; +import logger from '../../../src/logger'; +import { OpenAiResponsesProvider } from '../../../src/providers/openai/responses'; + +// Mock the fetchWithCache function +jest.mock('../../../src/cache', () => ({ + fetchWithCache: jest.fn(), +})); + +// Mock ...
The test asserts raw response content by string matching; consider asserting the parsed JSON structure to ensure the response format is as expected.
promptfoo
github_2023
typescript
3,440
promptfoo
github-advanced-security[bot]
@@ -0,0 +1,1212 @@ +import * as cache from '../../../src/cache'; +import logger from '../../../src/logger'; +import { OpenAiResponsesProvider } from '../../../src/providers/openai/responses'; + +// Mock the fetchWithCache function +jest.mock('../../../src/cache', () => ({ + fetchWithCache: jest.fn(), +})); + +// Mock ...
## Hard-coded credentials The hard-coded value "invalid-key" is used as [authorization header](1). [Show more details](https://github.com/promptfoo/promptfoo/security/code-scanning/89)
promptfoo
github_2023
typescript
3,443
promptfoo
ellipsis-dev[bot]
@@ -603,36 +682,34 @@ export class AzureAssistantProvider extends AzureGenericProvider { }, ); + // Process user messages first, then assistant messages and tool calls const outputBlocks: string[] = []; - const runResponseObj = - typeof runIdOrResponse === 'string' - ?...
Avoid using the non-null assertion operator (e.g. `content.text!.value`). Instead, add a type guard or check to ensure that `content.text` is defined before accessing its value. ```suggestion content.type === 'text' && content.text ? content.text.value : `<${content.type} output>`, ```
promptfoo
github_2023
typescript
3,443
promptfoo
ellipsis-dev[bot]
@@ -451,37 +669,64 @@ export class AzureAssistantProvider extends AzureGenericProvider { }); if (functionCallsWithCallbacks.length === 0) { - logger.error( - `No function calls with callbacks found. Available functions: ${Object.keys( + // No matching...
Avoid using the non-null assertion operator (`toolCall.function!`). Instead, check if `toolCall.function` exists and throw an error or handle the condition. This improves type safety.
promptfoo
github_2023
typescript
3,443
promptfoo
ellipsis-dev[bot]
@@ -91,10 +96,156 @@ export class AzureAssistantProvider extends AzureGenericProvider { assistantConfig: AzureAssistantOptions; + private loadedFunctionCallbacks: Record<string, Function> = {}; constructor(deploymentName: string, options: AzureAssistantProviderOptions = {}) { super(deploymentName, opti...
Avoid using `new Function` to evaluate inline function strings. Instead, add an invariant check or use a safe evaluation utility to reduce potential security risks with dynamic code execution.
promptfoo
github_2023
others
3,443
promptfoo
ellipsis-dev[bot]
@@ -400,13 +400,16 @@ Azure OpenAI Assistants support custom function tools. You can define functions ```yaml providers: - - id: azure:assistant:asst_example + - id: azure:assistant:your_assistant_id config: - apiHost: promptfoo.openai.azure.com + apiHost: your-resource-name.openai.azure.com ...
Avoid duplicate keys in YAML. The `'get_weather'` key is defined twice in `functionToolCallbacks` (external file then inline) which may confuse users as YAML will only use the latter.
promptfoo
github_2023
others
3,433
promptfoo
ellipsis-dev[bot]
@@ -0,0 +1,183 @@ +--- +sidebar_label: Misinformation in LLMs—Causes and Prevention Strategies +title: Misinformation in LLMs—Causes and Prevention Strategies +image: /img/blog/misinformation/misinformed_panda.png +date: 2025-03-19 +--- + +# Misinformation in LLMs: Causes and Prevention Strategies + +Misinformation in ...
The phrase 'may be concerned inaccurate' is unclear. Consider rewording for clarity (e.g., 'may be considered inaccurate by other social groups'). ```suggestion Certain models may propagate information that may be considered inaccurate by other social groups, subsequently spreading disinformation. ```
promptfoo
github_2023
others
3,433
promptfoo
ellipsis-dev[bot]
@@ -0,0 +1,183 @@ +--- +sidebar_label: Misinformation in LLMs—Causes and Prevention Strategies +title: Misinformation in LLMs—Causes and Prevention Strategies +image: /img/blog/misinformation/misinformed_panda.png +date: 2025-03-19 +--- + +# Misinformation in LLMs: Causes and Prevention Strategies + +Misinformation in ...
Inline `figcaption` style uses JSX syntax. If not using MDX, convert to standard HTML style syntax. ```suggestion <figcaption style="text-align: center; font-style: italic;"> ```
promptfoo
github_2023
others
3,433
promptfoo
ellipsis-dev[bot]
@@ -0,0 +1,183 @@ +--- +sidebar_label: Misinformation in LLMs—Causes and Prevention Strategies +title: Misinformation in LLMs—Causes and Prevention Strategies +image: /img/blog/misinformation/misinformed_panda.png +date: 2025-03-19 +--- + +# Misinformation in LLMs: Causes and Prevention Strategies + +Misinformation in ...
The introductory sentence says 'categorized into four different risks', but there are actually five risks listed. Consider updating the text to reflect the correct number of risks. ```suggestion Misinformation can be caused by a number of factors, ranging from prompting, model configurations, knowledge cutoffs, or lack...
promptfoo
github_2023
others
3,433
promptfoo
ellipsis-dev[bot]
@@ -0,0 +1,178 @@ +--- +sidebar_label: Misinformation in LLMs—Causes and Prevention Strategies +title: Misinformation in LLMs—Causes and Prevention Strategies +image: /img/blog/misinformation/misinformed_panda.png +date: 2025-03-19 +--- + +# Misinformation in LLMs: Causes and Prevention Strategies + +Misinformation in ...
Using JSX style object in `figcaption`. Ensure the markdown is processed as MDX, otherwise this might break rendering.
promptfoo
github_2023
typescript
3,429
promptfoo
ellipsis-dev[bot]
@@ -21,6 +21,7 @@ export type EnvVars = { PROMPTFOO_DISABLE_CONVERSATION_VAR?: boolean; PROMPTFOO_DISABLE_ERROR_LOG?: boolean; PROMPTFOO_DISABLE_JSON_AUTOESCAPE?: boolean; + PROMPTFOO_DISABLE_NUNJUCKS?: boolean;
Use existing `PROMPTFOO_DISABLE_TEMPLATING` environment variable instead of adding a new one - both serve to disable Nunjucks rendering. - `PROMPTFOO_DISABLE_TEMPLATING` environment variable ([templates.ts](https://github.com/promptfoo/promptfoo/blob/376f521cb771be335bf95b241f07abe82a806d0f/src/util/templates.ts#L19-L...
promptfoo
github_2023
others
3,432
promptfoo
ellipsis-dev[bot]
@@ -57,7 +57,7 @@ "local:web": "npm run dev --prefix src/app", "local": "ts-node --cwdMode --transpileOnly src/main.ts", "preversion": "[ \"$(git rev-parse --abbrev-ref HEAD)\" = \"main\" ] || (echo \"Error: Must be on main branch to version\" && exit 1) && git pull origin main && git checkout -b \"chore...
Consider parameterizing the repository name instead of hardcoding 'promptfoo/promptfoo'. Using an env variable or referencing the package.json repository field would enhance maintainability. ```suggestion "postversion": "npm run citation:generate && git add CITATION.cff && git commit --amend --no-edit && gh pr crea...
promptfoo
github_2023
typescript
3,421
promptfoo
ellipsis-dev[bot]
@@ -115,6 +115,12 @@ interface CompletionOptions { tools?: Tool[]; + /** + * If set, automatically call these functions when the assistant activates + * these function tools. + */ + functionToolCallbacks?: Record<string, (arg: string) => Promise<string>>;
The type for `functionToolCallbacks` is declared as returning a `Promise<string>`, but the callbacks (e.g., in the demo config and tests) return objects. Consider updating the type (e.g., to `Promise<any>` or `Promise<unknown>`) so that it accurately reflects the return value. ```suggestion functionToolCallbacks?: Re...
promptfoo
github_2023
typescript
3,421
promptfoo
ellipsis-dev[bot]
@@ -331,4 +331,141 @@ describe('GoogleMMLiveProvider', () => { process.env.GOOGLE_API_KEY = originalApiKey; } }); + + it('should handle function tool callbacks correctly', async () => { + jest.mocked(WebSocket).mockImplementation(() => { + setTimeout(() => { + mockWs.onopen?.({ type: 'ope...
Typo: In the function declaration for `errorFunction`, the parameter type is set to `OBJECT` (uppercase). To maintain consistency with other function declarations (e.g., `addNumbers` uses `object` in lowercase), please change `OBJECT` to `object`. ```suggestion type: 'object', ```
promptfoo
github_2023
typescript
3,424
promptfoo
ellipsis-dev[bot]
@@ -910,108 +995,358 @@ export class AzureAssistantProvider extends AzureGenericProvider { run.status === 'requires_action' ) { if (run.status === 'requires_action') { - const requiredAction = run.requiredAction; - invariant(requiredAction, 'Run requires action but no action is provided...
Using `new Function` to evaluate callback strings can be a security risk. Consider using a safer alternative or validating the input thoroughly to avoid potential arbitrary code execution.
promptfoo
github_2023
typescript
3,424
promptfoo
ellipsis-dev[bot]
@@ -910,108 +995,358 @@ run.status === 'requires_action' ) { if (run.status === 'requires_action') { - const requiredAction = run.requiredAction; - invariant(requiredAction, 'Run requires action but no action is provided'); - if (requiredAction === null || requiredAction.type !==...
There are several repeated API call patterns throughout the code. Extracting these into helper functions could reduce duplication and improve maintainability.
promptfoo
github_2023
typescript
3,424
promptfoo
ellipsis-dev[bot]
@@ -0,0 +1,866 @@ +import { fetchWithRetries } from '../../../src/fetch'; +import { AzureAssistantProvider } from '../../../src/providers/azure/assistant'; +import { sleep } from '../../../src/util/time'; + +// Mock dependencies +jest.mock('../../../src/fetch'); +jest.mock('../../../src/util/time'); +jest.mock('../../....
Unused variable `_originalPollRun`: remove it or use it for restoring the original `pollRun` implementation. ```suggestion ```
promptfoo
github_2023
typescript
3,424
promptfoo
ellipsis-dev[bot]
@@ -0,0 +1,866 @@ +import { fetchWithRetries } from '../../../src/fetch'; +import { AzureAssistantProvider } from '../../../src/providers/azure/assistant'; +import { sleep } from '../../../src/util/time'; + +// Mock dependencies +jest.mock('../../../src/fetch'); +jest.mock('../../../src/util/time'); +jest.mock('../../....
Wrap the global.Function override in a try/finally block to ensure the original Function is restored even if the test fails.
promptfoo
github_2023
typescript
3,424
promptfoo
ellipsis-dev[bot]
@@ -0,0 +1,866 @@ +import { fetchWithRetries } from '../../../src/fetch'; +import { AzureAssistantProvider } from '../../../src/providers/azure/assistant'; +import { sleep } from '../../../src/util/time'; + +// Mock dependencies +jest.mock('../../../src/fetch'); +jest.mock('../../../src/util/time'); +jest.mock('../../....
Test 'should create a thread, add a message, and run an assistant' mocks callApi directly, which bypasses internal implementation. Consider testing the full integration of the API call instead of replacing it.
promptfoo
github_2023
typescript
3,425
promptfoo
ellipsis-dev[bot]
@@ -0,0 +1,196 @@ +import type { + AssistantsClient, + RunStepMessageCreationDetails, + RunStepToolCallDetails, +} from '@azure/openai-assistants'; +import logger from '../../logger'; +import type { CallApiContextParams, CallApiOptionsParams, ProviderResponse } from '../../types'; +import invariant from '../../util/...
Avoid using the non-null assertion operator (`!`) when calling `this.assistantConfig.functionToolCallbacks`. Instead, add a runtime check or invariant (e.g. `invariant(this.assistantConfig.functionToolCallbacks, 'functionToolCallbacks must be provided')`) to verify it is defined before use. This change improves type-sa...
promptfoo
github_2023
others
3,416
promptfoo
ellipsis-dev[bot]
@@ -0,0 +1,395 @@ +--- +title: Red Teaming Multi-Modal Models +description: Learn how to use promptfoo to test the robustness of multi-modal LLMs against adversarial inputs involving both text and images. +keywords: + [ + red teaming, + multi-modal, + vision models, + safety testing, + image inputs, + ...
The keyword 'vision models' appears twice in the keywords array (lines 8 and 13). Remove one duplicate to improve clarity.
promptfoo
github_2023
others
2,566
promptfoo
mldangelo
@@ -0,0 +1,127 @@ +--- +sidebar_label: Defending Against Data Poisoning Attacks on LLMs—A Comprehensive Guide +image: /img/blog/data-poisoning/poisoning-panda.jpeg +date: 2025-01-07 +--- + +# Defending Against Data Poisoning Attacks on LLMs: A Comprehensive Guide + +<figure> + <div style={{ textAlign: 'center' }}> + ...
50,000 now. CTA comes off very strong and feels sales-y. Not specifically against it but worth flagging.
promptfoo
github_2023
others
2,566
promptfoo
mldangelo
@@ -0,0 +1,127 @@ +--- +sidebar_label: Defending Against Data Poisoning Attacks on LLMs—A Comprehensive Guide +image: /img/blog/data-poisoning/poisoning-panda.jpeg +date: 2025-01-07 +--- + +# Defending Against Data Poisoning Attacks on LLMs: A Comprehensive Guide + +<figure> + <div style={{ textAlign: 'center' }}> + ...
nit, some of the headings could use SEO optimization and better scannability. Consider making them more specific and descriptive. Use Robust Training Techniques to Use Robust Training Techniques for Data Poisoning Defense
promptfoo
github_2023
others
2,566
promptfoo
mldangelo
@@ -0,0 +1,127 @@ +--- +sidebar_label: Defending Against Data Poisoning Attacks on LLMs—A Comprehensive Guide +image: /img/blog/data-poisoning/poisoning-panda.jpeg +date: 2025-01-07 +--- + +# Defending Against Data Poisoning Attacks on LLMs: A Comprehensive Guide + +<figure> + <div style={{ textAlign: 'center' }}> + ...
What does this mean? Worth explaining more with a link or a sentence or removing. this is going to be hard to action for our customers and potential readers of the article.
promptfoo
github_2023
others
2,566
promptfoo
mldangelo
@@ -0,0 +1,127 @@ +--- +sidebar_label: Defending Against Data Poisoning Attacks on LLMs—A Comprehensive Guide +image: /img/blog/data-poisoning/poisoning-panda.jpeg +date: 2025-01-07 +--- + +# Defending Against Data Poisoning Attacks on LLMs: A Comprehensive Guide + +<figure> + <div style={{ textAlign: 'center' }}> + ...
Not a good tip for LLM application developers.
promptfoo
github_2023
others
2,566
promptfoo
mldangelo
@@ -0,0 +1,127 @@ +--- +sidebar_label: Defending Against Data Poisoning Attacks on LLMs—A Comprehensive Guide +image: /img/blog/data-poisoning/poisoning-panda.jpeg +date: 2025-01-07 +--- + +# Defending Against Data Poisoning Attacks on LLMs: A Comprehensive Guide + +<figure> + <div style={{ textAlign: 'center' }}> + ...
How do we do this?
promptfoo
github_2023
others
2,566
promptfoo
mldangelo
@@ -0,0 +1,127 @@ +--- +sidebar_label: Defending Against Data Poisoning Attacks on LLMs—A Comprehensive Guide +image: /img/blog/data-poisoning/poisoning-panda.jpeg +date: 2025-01-07 +--- + +# Defending Against Data Poisoning Attacks on LLMs: A Comprehensive Guide + +<figure> + <div style={{ textAlign: 'center' }}> + ...
excellent image!
promptfoo
github_2023
others
2,566
promptfoo
mldangelo
@@ -0,0 +1,127 @@ +--- +sidebar_label: Defending Against Data Poisoning Attacks on LLMs—A Comprehensive Guide +image: /img/blog/data-poisoning/poisoning-panda.jpeg +date: 2025-01-07 +--- + +# Defending Against Data Poisoning Attacks on LLMs: A Comprehensive Guide + +<figure> + <div style={{ textAlign: 'center' }}> + ...
consider rephrasing `and embeddings from external sources`. I don't quite understand what this stage is. Can we talk about it in a retrieval / RAG context?
promptfoo
github_2023
others
2,566
promptfoo
mldangelo
@@ -0,0 +1,127 @@ +--- +sidebar_label: Defending Against Data Poisoning Attacks on LLMs—A Comprehensive Guide +image: /img/blog/data-poisoning/poisoning-panda.jpeg +date: 2025-01-07 +--- + +# Defending Against Data Poisoning Attacks on LLMs: A Comprehensive Guide + +<figure> + <div style={{ textAlign: 'center' }}> + ...
nit, talk about generation over prediction
promptfoo
github_2023
others
2,566
promptfoo
mldangelo
@@ -0,0 +1,127 @@ +--- +sidebar_label: Defending Against Data Poisoning Attacks on LLMs—A Comprehensive Guide +image: /img/blog/data-poisoning/poisoning-panda.jpeg +date: 2025-01-07 +--- + +# Defending Against Data Poisoning Attacks on LLMs: A Comprehensive Guide + +<figure> + <div style={{ textAlign: 'center' }}> + ...
nit, crucial appears frequently in llm generated content, let's find a different word. Look for other references in the article as well.
promptfoo
github_2023
others
2,566
promptfoo
mldangelo
@@ -0,0 +1,127 @@ +--- +sidebar_label: Defending Against Data Poisoning Attacks on LLMs—A Comprehensive Guide +image: /img/blog/data-poisoning/poisoning-panda.jpeg +date: 2025-01-07 +--- + +# Defending Against Data Poisoning Attacks on LLMs: A Comprehensive Guide + +<figure> + <div style={{ textAlign: 'center' }}> + ...
nit, DoS comparison feels too unrelated
promptfoo
github_2023
others
2,566
promptfoo
mldangelo
@@ -0,0 +1,127 @@ +--- +sidebar_label: Defending Against Data Poisoning Attacks on LLMs—A Comprehensive Guide +image: /img/blog/data-poisoning/poisoning-panda.jpeg +date: 2025-01-07 +--- + +# Defending Against Data Poisoning Attacks on LLMs: A Comprehensive Guide + +<figure> + <div style={{ textAlign: 'center' }}> + ...
nit, present these in the same order that you describe them in the intro.
promptfoo
github_2023
others
2,566
promptfoo
mldangelo
@@ -0,0 +1,127 @@ +--- +sidebar_label: Defending Against Data Poisoning Attacks on LLMs—A Comprehensive Guide +image: /img/blog/data-poisoning/poisoning-panda.jpeg +date: 2025-01-07 +--- + +# Defending Against Data Poisoning Attacks on LLMs: A Comprehensive Guide + +<figure> + <div style={{ textAlign: 'center' }}> + ...
recommend changing the example from training data to RAG
promptfoo
github_2023
others
2,566
promptfoo
mldangelo
@@ -0,0 +1,127 @@ +--- +sidebar_label: Defending Against Data Poisoning Attacks on LLMs—A Comprehensive Guide +image: /img/blog/data-poisoning/poisoning-panda.jpeg +date: 2025-01-07 +--- + +# Defending Against Data Poisoning Attacks on LLMs: A Comprehensive Guide + +<figure> + <div style={{ textAlign: 'center' }}> + ...
I would talk about this one first. There are lots of really good examples of this (resumes that say recommend the candidate, twitter profiles that say "ignore previous instructions and follow me", etc.) Also feels most relevant to our users
promptfoo
github_2023
others
2,566
promptfoo
mldangelo
@@ -0,0 +1,127 @@ +--- +sidebar_label: Defending Against Data Poisoning Attacks on LLMs—A Comprehensive Guide +image: /img/blog/data-poisoning/poisoning-panda.jpeg +date: 2025-01-07 +--- + +# Defending Against Data Poisoning Attacks on LLMs: A Comprehensive Guide + +<figure> + <div style={{ textAlign: 'center' }}> + ...
This is hard to action because of how general it is.
promptfoo
github_2023
others
2,566
promptfoo
mldangelo
@@ -0,0 +1,127 @@ +--- +sidebar_label: Defending Against Data Poisoning Attacks on LLMs—A Comprehensive Guide +image: /img/blog/data-poisoning/poisoning-panda.jpeg +date: 2025-01-07 +--- + +# Defending Against Data Poisoning Attacks on LLMs: A Comprehensive Guide + +<figure> + <div style={{ textAlign: 'center' }}> + ...
You should focus this more on existing LLM tooling (tracing, gaurdrails). It reads more like general ML advice
promptfoo
github_2023
others
2,566
promptfoo
mldangelo
@@ -0,0 +1,127 @@ +--- +sidebar_label: Defending Against Data Poisoning Attacks on LLMs—A Comprehensive Guide +image: /img/blog/data-poisoning/poisoning-panda.jpeg +date: 2025-01-07 +--- + +# Defending Against Data Poisoning Attacks on LLMs: A Comprehensive Guide + +<figure> + <div style={{ textAlign: 'center' }}> + ...
also hard to action. Consider rephrasing in a LLM context (eval set, golden datasets, etc.)
promptfoo
github_2023
others
2,566
promptfoo
mldangelo
@@ -0,0 +1,127 @@ +--- +sidebar_label: Defending Against Data Poisoning Attacks on LLMs—A Comprehensive Guide +image: /img/blog/data-poisoning/poisoning-panda.jpeg +date: 2025-01-07 +--- + +# Defending Against Data Poisoning Attacks on LLMs: A Comprehensive Guide + +<figure> + <div style={{ textAlign: 'center' }}> + ...
this should be a strong call to action for us
promptfoo
github_2023
others
2,566
promptfoo
mldangelo
@@ -0,0 +1,127 @@ +--- +sidebar_label: Defending Against Data Poisoning Attacks on LLMs—A Comprehensive Guide +image: /img/blog/data-poisoning/poisoning-panda.jpeg +date: 2025-01-07 +--- + +# Defending Against Data Poisoning Attacks on LLMs: A Comprehensive Guide + +<figure> + <div style={{ textAlign: 'center' }}> + ...
Are API keys relevant to modifying training data?
promptfoo
github_2023
others
2,566
promptfoo
mldangelo
@@ -0,0 +1,127 @@ +--- +sidebar_label: Defending Against Data Poisoning Attacks on LLMs—A Comprehensive Guide +image: /img/blog/data-poisoning/poisoning-panda.jpeg +date: 2025-01-07 +--- + +# Defending Against Data Poisoning Attacks on LLMs: A Comprehensive Guide + +<figure> + <div style={{ textAlign: 'center' }}> + ...
vague and general
promptfoo
github_2023
others
2,566
promptfoo
mldangelo
@@ -0,0 +1,127 @@ +--- +sidebar_label: Defending Against Data Poisoning Attacks on LLMs—A Comprehensive Guide +image: /img/blog/data-poisoning/poisoning-panda.jpeg +date: 2025-01-07 +--- + +# Defending Against Data Poisoning Attacks on LLMs: A Comprehensive Guide + +<figure> + <div style={{ textAlign: 'center' }}> + ...
how?
promptfoo
github_2023
others
2,566
promptfoo
mldangelo
@@ -0,0 +1,127 @@ +--- +sidebar_label: Defending Against Data Poisoning Attacks on LLMs—A Comprehensive Guide +image: /img/blog/data-poisoning/poisoning-panda.jpeg +date: 2025-01-07 +--- + +# Defending Against Data Poisoning Attacks on LLMs: A Comprehensive Guide + +<figure> + <div style={{ textAlign: 'center' }}> + ...
why does this matter for data poisoning?