Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a tool to query ORAssistant #6226

Draft
wants to merge 48 commits into
base: master
Choose a base branch
from

Conversation

palaniappan-r
Copy link

Implemented the askbot and set_bothost commands under the ora tool. They can be used to make queries to ORAssistant, a LLM based conversational assistant for OpenROAD

askbot

This command takes an argument and passes it as a query to the hosted ORAssistant backend, by making a POST request using the libcurl library.

set_bothost

This command modifies ORAssistant backend's URL that's being queried by askbot. The modified URL is then saved to a file locally, for subsequent reference.

palaniappan-r and others added 25 commits October 21, 2024 14:36
Signed-off-by: Palaniappan R <[email protected]>
Signed-off-by: Palaniappan R <[email protected]>
Signed-off-by: Palaniappan R <[email protected]>
Signed-off-by: Palaniappan R <[email protected]>
Signed-off-by: Palaniappan R <[email protected]>
Signed-off-by: Palaniappan R <[email protected]>
Signed-off-by: Palaniappan R <[email protected]>
Signed-off-by: Palaniappan R <[email protected]>
Signed-off-by: Palaniappan R <[email protected]>
Signed-off-by: Palaniappan R <[email protected]>
Signed-off-by: Palaniappan R <[email protected]>
Signed-off-by: Palaniappan R <[email protected]>
@rovinski
Copy link
Collaborator

Why can't this run locally as an add-on rather than sending requests over the internet?

@palaniappan-r
Copy link
Author

Why can't this run locally as an add-on rather than sending requests over the internet?

If the user chooses to the application locally, they'll have to follow instructions on ORAssistant's README, spin the backend server up, and use the set_bothost command to have the askbot command query the local server instead.

Currently, askbot queries a hosted version of ORAssistant by default, but I can change this if necessary.

@rovinski
Copy link
Collaborator

Is there a data control plan or disclaimer if users are sending data over the internet? GDPR may even come into play here.

@palaniappan-r palaniappan-r marked this pull request as draft December 5, 2024 15:17
@palaniappan-r palaniappan-r marked this pull request as ready for review December 7, 2024 23:01
@palaniappan-r palaniappan-r marked this pull request as draft December 18, 2024 00:23
@palaniappan-r palaniappan-r marked this pull request as ready for review December 21, 2024 03:14
Copy link
Contributor

@luarss luarss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some nits, no comments on code end

@@ -18,4 +18,4 @@ WORKDIR /OpenROAD

ENV PATH=${LOCAL_PATH}:${PATH}

RUN ./etc/Build.sh -compiler=${compiler} -threads=${numThreads} -deps-prefixes-file=${depsPrefixFile}
RUN ./etc/Build.sh -compiler=${compiler} -threads=${numThreads} -deps-prefixes-file=${depsPrefixFile}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is there a change here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted.

@@ -579,7 +583,7 @@ _installDebianPackages() {
unzip \
wget \
zlib1g-dev

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stray change?

@@ -0,0 +1,43 @@
# Copyright (c) 2024, The Regents of the University of California
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe Copyright 2025?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated it now.

@palaniappan-r palaniappan-r requested a review from luarss January 4, 2025 18:26
@luarss
Copy link
Contributor

luarss commented Jan 5, 2025

@palaniappan-r no further comments from me, pending @maliberty and @vvbandeira review.

@luarss
Copy link
Contributor

luarss commented Jan 5, 2025

On second thought, I think we need to mark this as draft because the permalink is not available. I will discuss more with @dralabeing and @vvbandeira.

@palaniappan-r palaniappan-r marked this pull request as draft January 5, 2025 18:14
Copy link
Collaborator

@gadfort gadfort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no README for this

hostUrl
= "https://bursting-stallion-friendly.ngrok-free.app/graphs/"
"agent-retriever";
localDirPath = std::string(getenv("HOME")) + "/.local/share/openroad";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not make a helper function to generate this path since it's used in multiple locations

if (!localDir) {
logger_->info(utl::ORA, 112, "Creating ~/.local/share/openroad directory.");
std::string mkdirCmd = "mkdir -p " + localDirPath;
int ret = system(mkdirCmd.c_str());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't it be better to use: https://en.cppreference.com/w/cpp/filesystem/create_directory instead of generating a system call (something I think we could avoid)

}
}

void Ora::setConsent(const char* consent)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since you are checking for just a "y" for yes, I think you need to verify that this consent string matches your expectations.

}

proc set_consent { consent } {
puts "Setting ORAssistant consent to yes."
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is I said "no"?

Comment on lines +1 to +5
record_tests {
set_bothost1
set_consent1
askbot1
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all the testing needs to be moved to the CTest as this was removed.

ora::set_bothost $hostUrl
}

proc set_consent { consent } {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set_consent is an awfully generic name, it might be better as set_ora_consent

@rovinski
Copy link
Collaborator

rovinski commented Jan 6, 2025

The request for consent is a bit better than the state before, but there are still a few things I would want to see change:

  1. Default to a locally hosted copy first, or at least explicitly ask the user if it's okay to use the web-hosted version
  2. Make it explicit that only the data the user types will be sent outside the application, no other user or design data.
  3. Point to directions on how to set up a locally hosted copy on first use
  4. Don't require consent for anything other than the web-hosted copy (not only because it's not needed, but because safety guarantees can't be provided)
  5. There needs to be some kind of versioning for the consent. If there were to be a new version in the future which has a different kind of privacy policy, then you can't rely on an old consent file with a new version of OpenROAD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants