{% extends "base.html" %} {% block content %}
Oracle LAD A-Team
Cristiano Hoshikawa
cristiano.hoshikawa@oracle.com
Tutorial
Oracle Learn – OCI Generative AI PDF RAG
Oracle GraphRAG for RFP Validation
REST Service Endpoint
{{ api_base_url }}/rest/chat
This application provides an AI-assisted RFP response engine for Oracle Cloud Infrastructure (OCI). It analyzes natural language requirements and returns a structured, evidence-based technical response.
GraphRAG • Oracle Autonomous Database 23ai • Embeddings • Knowledge Graph • LLM • Flask API
Enter an RFP requirement or technical question below. The API will return a structured JSON response.
This is an advanced analysis engine for designing Architectural Solutions based on OCI resources. It uses LRM mechanism with Chain-of-Tought to prepare solutions that require a set of components in OCI.
Upload an Excel file and receive the processed result by email. You do not need to keep this page open.
Follow the Excel format:
Column A: MUST be a sequential numeric
Column B, C: MUST be fill with a context. Could be a domain and sub-domain for the question
Column D: Optional
Column E: MUST be the main question
The service exposes a POST endpoint that accepts a JSON payload.
curl -X POST {{ api_base_url }}/rest/chat
-H "Content-Type: application/json"
-u app_user:app_password
-d '{
"question": "Does Oracle Cloud Infrastructure (OCI) Compute support online resizing of memory for running virtual machine instances?"
}'
question (string)
Natural language description of an RFP requirement or technical capability.
Small wording changes may affect how intent and evidence are interpreted.
The API always returns a strict and normalized JSON structure, designed for traceability, auditing, and human validation.
Final assessment of the requirement: YES, NO, or PARTIAL. A NO means the requirement is not explicitly satisfied as written.
Indicates the strength of the supporting evidence: HIGH, MEDIUM, or LOW.
Flags whether the requirement is vague, overloaded, or open to interpretation.
Short explanation justifying the confidence level.
Technical rationale connecting the evidence to the requirement. This is not marketing text.
List of supporting references:
This solution exposes a REST API that allows RFP questions to be evaluated programmatically. By consuming this API, users can execute a Python automation that reads spreadsheet files, builds contextualized questions, sends them to the AI service, and writes the results back to the same spreadsheet.
The automation supports both hierarchical and non-hierarchical spreadsheet structures. Depending on how the spreadsheet is organized, the Python code automatically determines how to construct each question, ensuring that the context sent to the AI is accurate, consistent, and auditable.
This approach enables large RFP documents to be processed in bulk, replacing manual analysis with a repeatable and controlled workflow driven by a REST interface and a Python execution layer.
A spreadsheet is considered hierarchical when it contains a numbering column that represents a tree structure, such as:
1
1.1
1.1.1
1.2
In this format:
1.2.3 inherits context from 1 → 1.2
A spreadsheet is considered non-hierarchical when no valid hierarchical numbering exists or when numbering does not represent a logical structure.
In these cases, context is distributed across specific columns, for example:
Domain | Subdomain | Topic | Question
The pipeline uses only explicitly declared context columns, preventing semantic noise such as internal IDs or technical codes from being included in the prompt.
If the order value is hierarchical:
use numeric hierarchy
Else:
use column-based hierarchy
def is_hierarchical(num: str) -> bool:
if not num:
return False
parts = num.split(".")
return all(p.isdigit() for p in parts)
This function determines whether a row belongs to the numeric hierarchy.
def build_question(hierarchy: dict, current_num: str) -> str:
...
return f'Considering the context of "{context}", {specific}'
This logic walks up the hierarchy tree to build a contextualized question.
def build_question_from_columns(row, context_cols, question_col):
...
return f'Considering the context of "{context}", {question}'
This builder is used only when no numeric hierarchy exists.
row = df.loc[info["row"]]
num = normalize_num(str(row.iloc[ORDER_COLUMN]))
CONTEXT_COLUMNS)process_excel_rfp.py, you must configure the input spreadsheet, the REST endpoint,
and authentication. These parameters can be set directly in the script or provided via environment variables.
pip install pandas requests openpyxlprocess_excel_rfp.py and update the values below:
EXCEL_PATH = "/path/to/your/RFP.xlsx"
API_URL = "{{ api_base_url }}/chat"
TIMEOUT = 120
ORDER_COLUMN = 0 # column index containing the order/numbering
QUESTION_COLUMN = 1 # column index containing the question text
# Use this only for NON-hierarchical spreadsheets:
CONTEXT_COLUMNS = [1, 2] # columns that contain context (domain, topic, section, etc.)
# Output column names (created if missing):
ANSWER_COL = "ANSWER"
JSON_COL = "RESULT_JSON"
Full path to the spreadsheet you want to process. The script reads this file and writes a new output file
named _resultado.xlsx in the same folder.
The REST endpoint exposed by the AI service. It must accept:
POST with JSON payload {"question": "..."} .
The script uses ORDER_COLUMN to identify hierarchy (e.g., 1, 1.1, 1.1.1).
The QUESTION_COLUMN is the text that will be sent to the AI.
If your spreadsheet is not hierarchical, context comes from fixed columns (for example: Domain → Subdomain → Topic).
Only the columns listed in CONTEXT_COLUMNS will be used to build context.
This avoids adding noisy values such as internal IDs or codes.
The script uses HTTP Basic Auth to call the API. Configure credentials using environment variables:
export APP_USER="YOU USER"
export APP_PASS="YOUR PASSWORD"
On Windows PowerShell:
setx APP_USER "YOUR USER"
setx APP_PASS "YOUR PASSWORD"
If not provided, the script falls back to the defaults defined in the code:
APP_USER / APP_PASS.
python process_excel_rfp.py
The script will:
queries_with_low_confidence_or_no.txtRFP_result.xlsx