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

COMMENTS - Empty PR #1256

Open
wants to merge 3,775 commits into
base: empty-branch
Choose a base branch
from
Open

COMMENTS - Empty PR #1256

wants to merge 3,775 commits into from

Conversation

JLoweAI
Copy link
Contributor

@JLoweAI JLoweAI commented Dec 13, 2024

I created an empty branch and look to merge feature/remove-search into it to allow me to comment across the whole repo

saisakul and others added 30 commits October 24, 2024 14:15
Co-authored-by: George Burton <[email protected]>
fix ingest error due to metadata size exceed max size
…1130)

* diabled gadget tests whilst we are actively working on them

* reverted change

* formatting
Bumps the pip group with 1 update in the /django_app directory: [werkzeug](https://github.com/pallets/werkzeug).
Bumps the pip group with 1 update in the /redbox-core directory: [werkzeug](https://github.com/pallets/werkzeug).
Bumps the pip group with 1 update in the / directory: [werkzeug](https://github.com/pallets/werkzeug).


Updates `werkzeug` from 3.0.4 to 3.0.6
- [Release notes](https://github.com/pallets/werkzeug/releases)
- [Changelog](https://github.com/pallets/werkzeug/blob/main/CHANGES.rst)
- [Commits](pallets/werkzeug@3.0.4...3.0.6)

Updates `werkzeug` from 3.0.4 to 3.0.6
- [Release notes](https://github.com/pallets/werkzeug/releases)
- [Changelog](https://github.com/pallets/werkzeug/blob/main/CHANGES.rst)
- [Commits](pallets/werkzeug@3.0.4...3.0.6)

Updates `werkzeug` from 3.0.4 to 3.0.6
- [Release notes](https://github.com/pallets/werkzeug/releases)
- [Changelog](https://github.com/pallets/werkzeug/blob/main/CHANGES.rst)
- [Commits](pallets/werkzeug@3.0.4...3.0.6)

---
updated-dependencies:
- dependency-name: werkzeug
  dependency-type: indirect
  dependency-group: pip
- dependency-name: werkzeug
  dependency-type: indirect
  dependency-group: pip
- dependency-name: werkzeug
  dependency-type: indirect
  dependency-group: pip
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Fixed passing citations through in agentic search
* restored doc name

* replaced more original_file_name
* unique-citation uris

* removed unused arg
chat_map_question_prompt: str = prompts.CHAT_MAP_QUESTION_PROMPT
reduce_system_prompt: str = prompts.REDUCE_SYSTEM_PROMPT

# Elasticsearch RAG and boost values
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These can go?


# Task Prompt Fragments

chat_system_prompt: str = prompts.CHAT_SYSTEM_PROMPT
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we just need one system prompt now?


class RedboxState(BaseModel):
request: RedboxQuery
documents: Annotated[DocumentState, document_reducer] = DocumentState()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Are we still going to attatch documents to the state like this? Or have it be something that is more linked to the chat history?

documents: Annotated[DocumentState, document_reducer] = DocumentState()
route_name: str | None = None
metadata: Annotated[RequestMetadata | None, metadata_reducer] = None
citations: list[Citation] | None = None
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Remove?

return _merge


def build_stuff_pattern(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am guessing this and the chat pattern will be the only ones we need?

prompt_set: PromptSet,
output_parser: Runnable = None,
format_instructions: str | None = None,
tools: list[StructuredTool] | None = None,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Remove tools?

stuff_chunk_context_ratio = models.FloatField(null=True, blank=True)
recursion_limit = models.PositiveIntegerField(null=True, blank=True)

chat_system_prompt = models.TextField(null=True, blank=True)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Am I right in thinking this is all needed because it was weirdly picking up empty strings and using them for the prompts?

I wonder if this is something we could improve while refactoring? Especially as we are slimming down the number of prompts.

chat_map_question_prompt = models.TextField(null=True, blank=True)
reduce_system_prompt = models.TextField(null=True, blank=True)

# Elsticsearch RAG and boost values
Copy link
Contributor Author

Choose a reason for hiding this comment

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

To delete?

document_loader(document_loader=loader, s3_client=s3_client, env=env)
| RunnableLambda(list)
| log_chunks
| RunnableLambda(partial(vectorstore.add_documents, create_index_if_not_exists=False)) # type: ignore[arg-type]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

What does this look like without the vector store?

def _ingest_file(file_name: str, es_index_name: str = alias):
logging.info("Ingesting file: %s", file_name)

es = env.elasticsearch_client()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

What does this look like without elasticsearch?

"""Run when chain errors."""
self.logger.error("Chain error: %s", error)

def on_text(self, text: str, **kwargs: Any) -> None: # noqa:ARG002
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is this where message logging happens?

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.

8 participants