-
Notifications
You must be signed in to change notification settings - Fork 5
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
Support reusing a prebuilt pipeline for multiple API calls #28
Comments
Can we have these API compatible with the interfaces FYI, @jwm4 @anastasds |
The ingestion interface ( |
IMO it's necessary, otherwise we should have to move all the model communications to |
Here are some thoughts from me:
|
I do not have an opinion on direction for PRAGmatic itself and will only speak to an architectural point of view regarding InstructLab. I struggle to find a coherent product design philosophy behind encapsulating model interactions within a RAG pipeline. Adding a second model interaction paradigm would almost definitely lead to duplication of code, feature disparity across the two, configuration complexity, a doubling of implementation cost of possible new chat-related functionality, likely double model evaluation costs by throwing into question equivalency of experimental setup, unnecessarily silo domain knowledge within the organization, complicate prompt template management, create a more complex and less understandable user interface, and more. Regarding the OpenAI-compatible API around PRAGatic, that would make sense to me if it were returning model responses. Otherwise, coercing a retrieval pipeline to return outputs that are formatted like chat model responses seems to be a significant amount of unnecessary complexity that, as far as I can tell, actually subtracts value. Another way of expressing this all is from the point of view of modularization - "things that change together should stay together". (See also: shearing layers.)Changes to model interactions in the InstructLab product should have to be made in only one place. This topic throws into question about whether PRAGmatic is the best fit for InstructLab's immediate need for a retrieval pipeline whose output can be incorporated into its existing chat functionality. Perhaps there is an underlying retrieval component that should be a common component of both PRAGmatic and InstructLab? |
I agree with you that "things that change together should stay together" -- but I feel the entire RAG pipeline (including retrieval and generation) is something that should change together, which is why I think it should stay together. Also, I agree that the OpenAI API makes sense only if it returns a response: that is what I was proposing. |
We have a lot going on this week, so let's revisit next week once we've all had more time to think about this topic. |
Two things to mention here:
|
Or even do both: Have an OpenAI-compatible wrapper which takes as input an OpenAI-compatible responde generation object. |
I almost left a comment that one approach I see to having a unified chat paradigm would be with "InstructLab as a backend" to PRAGmatic, which is the same exact idea. However, the naive approach - InstructLab uses PRAGmatic for retrieval, PRAGmatic uses InstructLab for chat - would create a circular dependency between the two codebases. Even if both publish client libraries independent of their core codebases, the dependency graph would end up having a loop (or be at significant risk of creating one in the future). |
This looks like the implementation of the BTW: I apologize for that, but my initial understanding was that PRAGmatic would act as a provider of modular RAG components ( |
This should include optionally altering the parameters specified at pipeline construction time.
The text was updated successfully, but these errors were encountered: